summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/indirector/exec_spec.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/unit/indirector/exec_spec.rb b/spec/unit/indirector/exec_spec.rb
index acad1ea93..de37f2775 100755
--- a/spec/unit/indirector/exec_spec.rb
+++ b/spec/unit/indirector/exec_spec.rb
@@ -47,10 +47,9 @@ describe Puppet::Indirector::Exec do
@searcher.find(@request).should be_nil
end
- it "should return nil and log an error if there's an execution failure" do
+ it "should raise an exception if there's an execution failure" do
@searcher.expects(:execute).with(%w{/echo foo}).raises(Puppet::ExecutionFailure.new("message"))
- Puppet.expects(:err)
- @searcher.find(@request).should be_nil
+ lambda {@searcher.find(@request)}.should raise_exception(Puppet::Error, 'Failed to find foo via exec: message')
end
end