1) Improve test so it doesn't fail if an autoload happens. 2) Improve test so it doesn't show a warning.
Signed-off-by: Jesse Wolfe <[email protected]> --- spec/unit/indirector/catalog/compiler.rb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/spec/unit/indirector/catalog/compiler.rb b/spec/unit/indirector/catalog/compiler.rb index 7f09422..84f5cdc 100755 --- a/spec/unit/indirector/catalog/compiler.rb +++ b/spec/unit/indirector/catalog/compiler.rb @@ -61,7 +61,7 @@ describe Puppet::Resource::Catalog::Compiler do describe "when finding catalogs" do before do Facter.stubs(:value).returns("whatever") - env = stub 'environment', :name => "yay" + env = stub 'environment', :name => "yay", :modulepath => [] Puppet::Node::Environment.stubs(:new).returns(env) @compiler = Puppet::Resource::Catalog::Compiler.new @@ -111,6 +111,7 @@ describe Puppet::Resource::Catalog::Compiler do end it "should extract and save any facts from the request" do + Puppet::Node.expects(:find).with(@name).returns @node @compiler.expects(:extract_facts_from_request).with(@request) @compiler.interpreter.stubs(:compile) @compiler.find(@request) -- 1.6.5 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
