summaryrefslogtreecommitdiffstats
path: root/spec/unit/util
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-05-12 14:31:01 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-05-12 14:31:01 -0700
commit82fb02ce27c95d8326335a8d52a9ab7e676fe8d3 (patch)
tree6706dc7afa05bf4bbffb2ab7e616717fb6af0c86 /spec/unit/util
parent7f9c9e1089c4bc36d52fcdd9751de559c658bf8d (diff)
parent704623cb95aacb0544609620994dc36f61a4b463 (diff)
Merge branch 'next'
Diffstat (limited to 'spec/unit/util')
-rwxr-xr-xspec/unit/util/command_line_spec.rb10
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