spec/acceptance/cookbook_resource_spec.rb in ridley-2.2.0 vs spec/acceptance/cookbook_resource_spec.rb in ridley-2.3.0

- old
+ new

@@ -16,11 +16,11 @@ context "when the cookbook of the name/version is found" do before { subject.download(name, version, destination) } it "downloads the cookbook to the destination" do - expect(File.exist?(destination.join("metadata.rb"))).to be_true + expect(File.exist?(destination.join("metadata.json"))).to be_true end end end describe "uploading a cookbook" do @@ -37,9 +37,17 @@ cookbook.providers.should have(1).item cookbook.recipes.should have(1).item cookbook.resources.should have(1).item cookbook.templates.should have(1).item cookbook.root_files.should have(1).items + end + + it "does not contain a raw metadata.rb but does contain a compiled metadata.json" do + subject.upload(path) + cookbook = subject.find("example_cookbook", "0.1.0") + + expect(cookbook.root_files.any? { |f| f[:name] == "metadata.json" }).to be_true + expect(cookbook.root_files.any? { |f| f[:name] == "metadata.rb" }).to be_false end end describe "listing cookbooks" do before do