diff options
| author | Vivek Singh <vivek.singh@msystechnologies.com> | 2019-10-29 00:24:18 +0530 |
|---|---|---|
| committer | Vivek Singh <vivek.singh@msystechnologies.com> | 2019-10-29 00:24:18 +0530 |
| commit | b3ec36bf24c462c1505f1e63ae2561ea809c4402 (patch) | |
| tree | 375f6071e57161892ff7429d8ec19920da74c644 /spec/unit/knife | |
| parent | d0908f4555b436eb74bbfee1a050a7cc84550aed (diff) | |
| download | chef-b3ec36bf24c462c1505f1e63ae2561ea809c4402.tar.gz | |
Fix knife cookbook metadata from file name args
Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
Diffstat (limited to 'spec/unit/knife')
| -rw-r--r-- | spec/unit/knife/cookbook_metadata_from_file_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/knife/cookbook_metadata_from_file_spec.rb b/spec/unit/knife/cookbook_metadata_from_file_spec.rb index 274eb5e167..69dbac7ac7 100644 --- a/spec/unit/knife/cookbook_metadata_from_file_spec.rb +++ b/spec/unit/knife/cookbook_metadata_from_file_spec.rb @@ -40,6 +40,13 @@ describe Chef::Knife::CookbookMetadataFromFile do end describe "run" do + it "should print usage and exit when a FILE is not provided" do + @knife.name_args = [] + expect(@knife).to receive(:show_usage) + expect(@knife.ui).to receive(:fatal).with(/You must specify the FILE./) + expect { @knife.run }.to raise_error(SystemExit) + end + it "should determine cookbook name from path" do expect(@md).to receive(:name).with(no_args) expect(@md).to receive(:name).with("quick_start") |
