summaryrefslogtreecommitdiffstats
path: root/spec/unit/application
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-07-21 15:35:35 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-07-22 13:29:04 -0700
commit039661156116cb6d3c5c8e372ed4d81af221453b (patch)
tree07fe2adb131d4a58c8523787ae4b534f61a2874e /spec/unit/application
parent5e2a3d200b74eef9549e3e2a5bdbe2a23ae7fac1 (diff)
downloadpuppet-039661156116cb6d3c5c8e372ed4d81af221453b.tar.gz
puppet-039661156116cb6d3c5c8e372ed4d81af221453b.tar.xz
puppet-039661156116cb6d3c5c8e372ed4d81af221453b.zip
maint: better error reporting when test fails
This test ensures, among other things, that we get a log message. If that fails, we were trying to call a random method on nil; making that an assertion means that we get a nice message rather than a failure that needs decoding. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
Diffstat (limited to 'spec/unit/application')
-rwxr-xr-xspec/unit/application/face_base_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/unit/application/face_base_spec.rb b/spec/unit/application/face_base_spec.rb
index 0a4a86be6..bebc26210 100755
--- a/spec/unit/application/face_base_spec.rb
+++ b/spec/unit/application/face_base_spec.rb
@@ -55,6 +55,7 @@ describe Puppet::Application::FaceBase do
it "should stop if the first thing found is not an action" do
app.command_line.stubs(:args).returns %w{banana count_args}
expect { app.run }.to exit_with 1
+ @logs.first.should_not be_nil
@logs.first.message.should =~ /has no 'banana' action/
end