diff options
| author | Luke Kanies <luke@madstop.com> | 2008-04-11 13:01:42 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-04-11 13:01:42 -0500 |
| commit | fb05ef3c96038d67a46eb142202af186ad6cb0b3 (patch) | |
| tree | 148e8b882e5c8104c4f3fa8ecc4288e8608f812d /spec/unit/node | |
| parent | b49fb68f768e8b98c555ef0ae08a7bd22f5d36bd (diff) | |
| parent | b49fd495622b15f96faf944db1e70cbe9e7fe7c4 (diff) | |
| download | puppet-fb05ef3c96038d67a46eb142202af186ad6cb0b3.tar.gz puppet-fb05ef3c96038d67a46eb142202af186ad6cb0b3.tar.xz puppet-fb05ef3c96038d67a46eb142202af186ad6cb0b3.zip | |
Merge branch '0.24.x'
Diffstat (limited to 'spec/unit/node')
| -rwxr-xr-x | spec/unit/node/catalog.rb | 4 | ||||
| -rwxr-xr-x | spec/unit/node/facts.rb | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/node/catalog.rb b/spec/unit/node/catalog.rb index d607b3540..8d7692442 100755 --- a/spec/unit/node/catalog.rb +++ b/spec/unit/node/catalog.rb @@ -794,14 +794,14 @@ end describe Puppet::Node::Catalog, " when indirecting" do before do - @indirection = mock 'indirection' + @indirection = stub 'indirection', :name => :catalog Puppet::Indirector::Indirection.clear_cache end it "should redirect to the indirection for retrieval" do Puppet::Node::Catalog.stubs(:indirection).returns(@indirection) - @indirection.expects(:find).with(:myconfig) + @indirection.expects(:find) Puppet::Node::Catalog.find(:myconfig) end diff --git a/spec/unit/node/facts.rb b/spec/unit/node/facts.rb index 743a7082e..1bfccd32e 100755 --- a/spec/unit/node/facts.rb +++ b/spec/unit/node/facts.rb @@ -6,7 +6,7 @@ require 'puppet/node/facts' describe Puppet::Node::Facts, " when indirecting" do before do - @indirection = mock 'indirection' + @indirection = stub 'indirection', :request => mock('request'), :name => :facts # We have to clear the cache so that the facts ask for our indirection stub, # instead of anything that might be cached. @@ -16,13 +16,13 @@ describe Puppet::Node::Facts, " when indirecting" do it "should redirect to the specified fact store for retrieval" do Puppet::Node::Facts.stubs(:indirection).returns(@indirection) - @indirection.expects(:find).with(:my_facts) + @indirection.expects(:find) Puppet::Node::Facts.find(:my_facts) end it "should redirect to the specified fact store for storage" do Puppet::Node::Facts.stubs(:indirection).returns(@indirection) - @indirection.expects(:save).with(@facts) + @indirection.expects(:save) @facts.save end |
