summaryrefslogtreecommitdiffstats
path: root/spec/integration/node
diff options
context:
space:
mode:
authorPaul Berry <paul@puppetlabs.com>2010-11-29 11:55:00 -0800
committerPaul Berry <paul@puppetlabs.com>2010-11-29 12:08:19 -0800
commit14f8160674628340ccfd79baeb84f66cf1e0398a (patch)
tree8acca5047c3e810535786b14c967e51c0623485f /spec/integration/node
parent52f9ef06507d87026936dc90dcb467a728ebd54f (diff)
downloadpuppet-14f8160674628340ccfd79baeb84f66cf1e0398a.tar.gz
puppet-14f8160674628340ccfd79baeb84f66cf1e0398a.tar.xz
puppet-14f8160674628340ccfd79baeb84f66cf1e0398a.zip
Maint: Refactor tests to use <class>.indirection.<method>
Replaced uses of the find, search, destroy, and expire methods on model classes with direct calls to the indirection objects. This change affects tests only.
Diffstat (limited to 'spec/integration/node')
-rwxr-xr-xspec/integration/node/facts_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/integration/node/facts_spec.rb b/spec/integration/node/facts_spec.rb
index 4cc2f4c1f..047d9d461 100755
--- a/spec/integration/node/facts_spec.rb
+++ b/spec/integration/node/facts_spec.rb
@@ -16,7 +16,7 @@ describe Puppet::Node::Facts do
terminus = Puppet::Node::Facts.indirection.terminus(:yaml)
terminus.stubs :save
- Puppet::Node.expects(:expire).with("me")
+ Puppet::Node.indirection.expects(:expire).with("me")
facts = Puppet::Node::Facts.new("me")
facts.save
@@ -31,7 +31,7 @@ describe Puppet::Node::Facts do
terminus.expects(:path).with("me").returns "/my/yaml/file"
FileTest.expects(:exist?).with("/my/yaml/file").returns false
- Puppet::Node::Facts.find("me").should be_nil
+ Puppet::Node::Facts.indirection.find("me").should be_nil
end
it "should be able to delegate to the :facter terminus" do
@@ -41,7 +41,7 @@ describe Puppet::Node::Facts do
facts = Puppet::Node::Facts.new("me")
Puppet::Node::Facts.expects(:new).with("me", "facter_hash").returns facts
- Puppet::Node::Facts.find("me").should equal(facts)
+ Puppet::Node::Facts.indirection.find("me").should equal(facts)
end
end
end