diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2009-12-14 15:21:56 -0800 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-12-16 18:00:52 +1100 |
commit | d343af0f2d115889543540bd3cc8bf66e9a9473e (patch) | |
tree | 5ecefb13dccdad530a9b855f4607e7536fdf7c63 | |
parent | a7fae4741cc3d266faa53c871bbb4a62b90f699c (diff) | |
download | puppet-d343af0f2d115889543540bd3cc8bf66e9a9473e.tar.gz puppet-d343af0f2d115889543540bd3cc8bf66e9a9473e.tar.xz puppet-d343af0f2d115889543540bd3cc8bf66e9a9473e.zip |
2876 spec/unit/indirector/catalog/compiler.rb changes behaviour
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 <jes5199@gmail.com>
-rwxr-xr-x | 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 7f0942221..84f5cdc56 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) |