diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-05-02 12:44:13 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-05-02 15:26:09 -0700 |
| commit | b20e9779f1c60a2a2ea1ddf21b3c5e06d8f68ac4 (patch) | |
| tree | dfdfe515aa34034fb285fa675a04a7e3518f91fe /spec | |
| parent | 3bb8bd30c039edaab0f9eb4ff6865ba5077bf549 (diff) | |
| download | puppet-b20e9779f1c60a2a2ea1ddf21b3c5e06d8f68ac4.tar.gz puppet-b20e9779f1c60a2a2ea1ddf21b3c5e06d8f68ac4.tar.xz puppet-b20e9779f1c60a2a2ea1ddf21b3c5e06d8f68ac4.zip | |
(#7304) Improve help from `puppet foo`
This addresses two of the four points: we now quote the subcommand name, and
emit 'Usage: ' before the usage information on the puppet command line.
Reviewed-By: Nick Lewis <nick@puppetlabs.com>
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/util/command_line_spec.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/unit/util/command_line_spec.rb b/spec/unit/util/command_line_spec.rb index 81612ee5c..d60bbb198 100755 --- a/spec/unit/util/command_line_spec.rb +++ b/spec/unit/util/command_line_spec.rb @@ -1,7 +1,7 @@ #!/usr/bin/env rspec require 'spec_helper' - +require 'puppet/face' require 'puppet/util/command_line' describe Puppet::Util::CommandLine do @@ -98,11 +98,9 @@ describe Puppet::Util::CommandLine do Puppet::Util.expects(:which).with('puppet-whatever').returns(nil) commandline.expects(:system).never - text = Puppet::Face[:help, :current].help - commandline.expects(:puts).with { |x| x =~ /Unknown Puppet subcommand/ } - commandline.expects(:puts).with text - - commandline.execute + expect { + commandline.execute + }.to have_printed(/Unknown Puppet subcommand 'whatever'/) end end end |
