spec/unit/berkshelf/api/dependency_cache_spec.rb in berkshelf-api-0.2.0 vs spec/unit/berkshelf/api/dependency_cache_spec.rb in berkshelf-api-1.0.0
- old
+ new
@@ -65,9 +65,16 @@
}
end
subject { described_class.new(contents) }
+ context "when a new DependencyCache is created" do
+ it "should allow indifferent access to items in the cache" do
+ expect(subject[:chicken]).to be_a(Hash)
+ expect(subject[:chicken][:'1.0'][:dependencies]).to be_a(Hash)
+ end
+ end
+
describe "#cookbooks" do
it "should return a list of RemoteCookbooks" do
expected_value = [
Berkshelf::API::RemoteCookbook.new("chicken", "1.0"),
Berkshelf::API::RemoteCookbook.new("tuna", "3.0.0")