diff options
author | Thom May <thom@may.lt> | 2016-01-12 18:51:03 +0000 |
---|---|---|
committer | Thom May <thom@may.lt> | 2016-01-12 18:51:03 +0000 |
commit | 5bb3067a0cca056ad47dda1994f8c845552da6a3 (patch) | |
tree | 4f2735a9b2b6766c9e1864ec97190b22583f00b2 /spec/functional | |
parent | d537eef6d200f79edd22810c2021aef2aa5f8056 (diff) | |
parent | 3719d656d5aae539c860f25d18368271724760b4 (diff) | |
download | chef-5bb3067a0cca056ad47dda1994f8c845552da6a3.tar.gz |
Merge pull request #4373 from PatrickWalker/feature/issue-4268
Ensuring running Help returns an exit code of 0
Diffstat (limited to 'spec/functional')
-rw-r--r-- | spec/functional/knife/smoke_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/functional/knife/smoke_test.rb b/spec/functional/knife/smoke_test.rb index 607e8065cf..b718bc50e0 100644 --- a/spec/functional/knife/smoke_test.rb +++ b/spec/functional/knife/smoke_test.rb @@ -31,4 +31,12 @@ describe "knife smoke tests" do knife_cmd.error! expect(knife_cmd.stdout).to include(Chef::VERSION) end + + it "can run and show help" do + knife_path = File.expand_path("../../bin/knife", CHEF_SPEC_DATA) + knife_cmd = Mixlib::ShellOut.new("#{knife_path} --help") + knife_cmd.run_command + knife_cmd.error! + expect(knife_cmd.stdout).to include("Usage") + end end |