summaryrefslogtreecommitdiffstats
path: root/spec/unit/application/queue_spec.rb
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-04-22 14:40:56 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-04-22 15:39:03 -0700
commit435c826ead5c81c3eb7c47efe9c52e2e77c14666 (patch)
treef6756a85891070cde7f2572206b8d8fc91e45aff /spec/unit/application/queue_spec.rb
parent96195c1dc2fea6262523fcc1726c6dfd7fea274a (diff)
downloadpuppet-435c826ead5c81c3eb7c47efe9c52e2e77c14666.tar.gz
puppet-435c826ead5c81c3eb7c47efe9c52e2e77c14666.tar.xz
puppet-435c826ead5c81c3eb7c47efe9c52e2e77c14666.zip
maint: use the exit_with helper everywhere...
Now we have the exit_with matcher, we should use it everywhere that we previously stubbed, expected, or caught the exit status in an ad-hoc way. Reviewed-By: Jesse Wolf <jesse@puppetlabs.com>
Diffstat (limited to 'spec/unit/application/queue_spec.rb')
-rwxr-xr-xspec/unit/application/queue_spec.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/spec/unit/application/queue_spec.rb b/spec/unit/application/queue_spec.rb
index d71c879a9..15e3927a1 100755
--- a/spec/unit/application/queue_spec.rb
+++ b/spec/unit/application/queue_spec.rb
@@ -86,18 +86,14 @@ describe Puppet::Application::Queue do
end
it "should print puppet config if asked to in Puppet config" do
- @queue.stubs(:exit)
Puppet.settings.stubs(:print_configs?).returns(true)
-
- Puppet.settings.expects(:print_configs)
-
- @queue.setup
+ Puppet.settings.expects(:print_configs).returns(true)
+ expect { @queue.setup }.to exit_with 0
end
it "should exit after printing puppet config if asked to in Puppet config" do
Puppet.settings.stubs(:print_configs?).returns(true)
-
- lambda { @queue.setup }.should raise_error(SystemExit)
+ expect { @queue.setup }.to exit_with 1
end
it "should call setup_logs" do