summaryrefslogtreecommitdiffstats
path: root/spec/unit/application
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-07-26 13:11:17 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-07-26 13:11:17 -0700
commitd88923bb830336d7f5fc1e0809923e9a69126995 (patch)
tree01ace2791bae85f9013ac808328c1c110ca3e0f7 /spec/unit/application
parentb13427b56d8529731d0334d420b24a592ecb43ea (diff)
parent4857ac928ccf1bd56d513eae201b57b12dd14a38 (diff)
downloadpuppet-d88923bb830336d7f5fc1e0809923e9a69126995.tar.gz
puppet-d88923bb830336d7f5fc1e0809923e9a69126995.tar.xz
puppet-d88923bb830336d7f5fc1e0809923e9a69126995.zip
Merge branch '2.7.x'
* 2.7.x: maint: Suggest where to start troubleshooting SSL error message maint: Fix cert app to print help and exit if no subcommand
Diffstat (limited to 'spec/unit/application')
-rwxr-xr-xspec/unit/application/cert_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/application/cert_spec.rb b/spec/unit/application/cert_spec.rb
index 7510f0783..300234c2b 100755
--- a/spec/unit/application/cert_spec.rb
+++ b/spec/unit/application/cert_spec.rb
@@ -208,5 +208,15 @@ describe Puppet::Application::Cert, :'fails_on_ruby_1.9.2' => true do
args.should == ["fun.example.com"]
end
end
+
+ it "should print help and exit if there is no subcommand" do
+ args = []
+ @cert_app.command_line.stubs(:args).returns(args)
+ @cert_app.stubs(:help).returns("I called for help!")
+ @cert_app.expects(:puts).with("I called for help!")
+
+ expect { @cert_app.parse_options }.to exit_with 0
+ @cert_app.subcommand.should be_nil
+ end
end
end