summaryrefslogtreecommitdiffstats
path: root/spec/integration/node_spec.rb
diff options
context:
space:
mode:
authorPaul Berry <paul@puppetlabs.com>2010-11-30 12:06:33 -0800
committerPaul Berry <paul@puppetlabs.com>2010-11-30 14:39:38 -0800
commitf77764de3ace7cc880a77466618a5affe1b61a8e (patch)
tree0722a29ce29cb1027c2c01687310026c4985517a /spec/integration/node_spec.rb
parent7de6af87109062a4c0b038f2f2d93191e6a93e4f (diff)
downloadpuppet-f77764de3ace7cc880a77466618a5affe1b61a8e.tar.gz
puppet-f77764de3ace7cc880a77466618a5affe1b61a8e.tar.xz
puppet-f77764de3ace7cc880a77466618a5affe1b61a8e.zip
Maint: Modified tests of indirector.save to call the indirection directly.
This change replaces calls to <model object>.save with calls to <model class>.indirection.save(<model object>). This makes the use of the indirector explicit rather than implicit so that it will be easier to search for all indirector call sites using grep. This is an intermediate refactor on the way towards allowing indirector calls to be explicitly routed to multiple termini. This patch affects tests only; the next patch will make the corresponding change to the code.
Diffstat (limited to 'spec/integration/node_spec.rb')
-rwxr-xr-xspec/integration/node_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/integration/node_spec.rb b/spec/integration/node_spec.rb
index 0d46259dd..911a423a0 100755
--- a/spec/integration/node_spec.rb
+++ b/spec/integration/node_spec.rb
@@ -68,19 +68,19 @@ describe Puppet::Node do
end
it "should be able to find nodes that were previously saved" do
- @node.save
+ Puppet::Node.indirection.save(@node)
Puppet::Node.indirection.find(@name).should equal(@node)
end
it "should replace existing saved nodes when a new node with the same name is saved" do
- @node.save
+ Puppet::Node.indirection.save(@node)
two = Puppet::Node.new(@name)
- two.save
+ Puppet::Node.indirection.save(two)
Puppet::Node.indirection.find(@name).should equal(two)
end
it "should be able to remove previously saved nodes" do
- @node.save
+ Puppet::Node.indirection.save(@node)
Puppet::Node.indirection.destroy(@node.name)
Puppet::Node.indirection.find(@name).should be_nil
end