diff options
Diffstat (limited to 'spec/unit/knife_spec.rb')
-rw-r--r-- | spec/unit/knife_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/knife_spec.rb b/spec/unit/knife_spec.rb index 022256f370..9e76ec59c4 100644 --- a/spec/unit/knife_spec.rb +++ b/spec/unit/knife_spec.rb @@ -117,6 +117,14 @@ describe Chef::Knife do expect(Chef::Knife.subcommands["super_awesome_command"]).to eq(SuperAwesomeCommand) end + it "records the location of ChefFS-based commands correctly" do + class AwesomeCheffsCommand < Chef::ChefFS::Knife + end + + Chef::Knife.load_commands + expect(Chef::Knife.subcommand_files["awesome_cheffs_command"]).to eq([__FILE__]) + end + it "guesses a category from a given ARGV" do Chef::Knife.subcommands_by_category["cookbook"] << :cookbook Chef::Knife.subcommands_by_category["cookbook site"] << :cookbook_site |