summaryrefslogtreecommitdiffstats
path: root/spec/unit/application/queue_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/unit/application/queue_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/unit/application/queue_spec.rb')
-rwxr-xr-xspec/unit/application/queue_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/application/queue_spec.rb b/spec/unit/application/queue_spec.rb
index 18fd8cea2..619f94e45 100755
--- a/spec/unit/application/queue_spec.rb
+++ b/spec/unit/application/queue_spec.rb
@@ -171,8 +171,8 @@ describe Puppet::Application::Queue do
end
it "should log and save each catalog passed by the queue" do
- catalog = mock 'catalog', :name => 'eh'
- catalog.expects(:save)
+ catalog = Puppet::Resource::Catalog.new('eh')
+ Puppet::Resource::Catalog.indirection.expects(:save).with(catalog, nil)
Puppet::Resource::Catalog::Queue.expects(:subscribe).yields(catalog)
Puppet.expects(:notice).times(2)