diff options
author | Patrick Walker <bpatrick.walker@gmail.com> | 2016-01-11 23:02:16 +0000 |
---|---|---|
committer | Patrick Walker <bpatrick.walker@gmail.com> | 2016-01-11 23:02:16 +0000 |
commit | 3719d656d5aae539c860f25d18368271724760b4 (patch) | |
tree | 27b6c879a23a76700d65e2cc12ddc77c34b687bc /spec/functional/knife | |
parent | 136cf3be7fd7477309ce61fde052c02c446dc931 (diff) | |
download | chef-3719d656d5aae539c860f25d18368271724760b4.tar.gz |
Ensuring running Help returns an exit code of 0
Diffstat (limited to 'spec/functional/knife')
-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 |