summaryrefslogtreecommitdiffstats
path: root/spec/integration
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/integration
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/integration')
-rwxr-xr-xspec/integration/application/doc_spec.rb4
-rwxr-xr-xspec/integration/transaction_spec.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/integration/application/doc_spec.rb b/spec/integration/application/doc_spec.rb
index df9b91608..c1e463033 100755
--- a/spec/integration/application/doc_spec.rb
+++ b/spec/integration/application/doc_spec.rb
@@ -36,8 +36,8 @@ describe Puppet::Application::Doc do
Puppet[:modulepath] = modules_dir
Puppet[:manifest] = site_file
puppet.options[:mode] = :rdoc
- puppet.expects(:exit).with(0)
- puppet.run_command
+
+ expect { puppet.run_command }.to exit_with 0
File.should be_exist('doc')
ensure
diff --git a/spec/integration/transaction_spec.rb b/spec/integration/transaction_spec.rb
index 78d62fc51..0ff50f47c 100755
--- a/spec/integration/transaction_spec.rb
+++ b/spec/integration/transaction_spec.rb
@@ -275,7 +275,7 @@ describe Puppet::Transaction do
it "should not attempt to evaluate resources with failed dependencies" do
exec = Puppet::Type.type(:exec).new(
- :command => "/bin/mkdir /this/path/cannot/possibly/exit",
+ :command => "/bin/mkdir /this/path/cannot/possibly/exist",
:title => "mkdir"
)
@@ -309,7 +309,7 @@ describe Puppet::Transaction do
)
exec = Puppet::Type.type(:exec).new(
- :command => "/bin/mkdir /this/path/cannot/possibly/exit",
+ :command => "/bin/mkdir /this/path/cannot/possibly/exist",
:title => "mkdir",
:notify => create_file1
)