diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-05-02 12:25:39 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-05-02 15:25:52 -0700 |
| commit | 3bb8bd30c039edaab0f9eb4ff6865ba5077bf549 (patch) | |
| tree | 0dba10b5caf804c7d3f158dc17b5f5834571ecd3 /spec | |
| parent | a71bfa10123276b1dc96c5ef540b9fbf222c2f6d (diff) | |
| download | puppet-3bb8bd30c039edaab0f9eb4ff6865ba5077bf549.tar.gz puppet-3bb8bd30c039edaab0f9eb4ff6865ba5077bf549.tar.xz puppet-3bb8bd30c039edaab0f9eb4ff6865ba5077bf549.zip | |
(#7317) better error handling in CLI face facade.
The error handling code in the face CLI facade was pretty terrible: it make a
bunch of assumptions about the structure of the error message it got back, and
used exceptions to communicate inside the same function.
Instead, we handle errors uniformly without raising and catching in the same
method, report more nicely, and exit cleanly in all cases.
Reviewed-By: Nick Lewis <nick@puppetlabs.com>
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/application/facts_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/application/facts_spec.rb b/spec/unit/application/facts_spec.rb index aed042675..2981dc805 100755 --- a/spec/unit/application/facts_spec.rb +++ b/spec/unit/application/facts_spec.rb @@ -11,8 +11,8 @@ describe Puppet::Application::Facts do subject.command_line.stubs(:args).returns %w{find} expect { expect { subject.run }.to exit_with 1 - }.to have_printed /1 argument expected but 0 given/ - @logs.first.to_s.should =~ /1 argument expected but 0 given/ + }.to have_printed /err: puppet facts find takes 1 argument, but you gave 0/ + @logs.first.to_s.should =~ /puppet facts find takes 1 argument, but you gave 0/ end it "should return facts if a key is given to find" do |
