summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/unit/knife/cookbook_site_install_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/unit/knife/cookbook_site_install_spec.rb b/spec/unit/knife/cookbook_site_install_spec.rb
index b3eef32b39..07b268bb64 100644
--- a/spec/unit/knife/cookbook_site_install_spec.rb
+++ b/spec/unit/knife/cookbook_site_install_spec.rb
@@ -184,7 +184,11 @@ describe Chef::Knife::CookbookSiteInstall do
end
it "rasies an error if it finds no metadata file" do
- expect { knife.preferred_metadata }.to raise_error(Chef::Exceptions::MetadataNotFound)
+ expect { knife.preferred_metadata }.to raise_error { |error|
+ expect(error).to be_a(Chef::Exceptions::MetadataNotFound)
+ expect(error.cookbook_name).to eq("post-punk-kitchen")
+ expect(error.install_path).to eq(install_path)
+ }
end
end