summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-01-13 10:25:20 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2015-01-13 10:25:20 -0800
commitded6262c2c80fd7b3d19e3a2488d503fa989d76c (patch)
tree01964920064347b6b00ffea5f226eeb7448f322b
parent8b2b41fb537317bcfb1e0e439f66ad466084f8f5 (diff)
downloadchef-ded6262c2c80fd7b3d19e3a2488d503fa989d76c.tar.gz
Update spec to check that information about why the cookbook was not found is populated
-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