diff --git a/spec/unit/library_spec.rb b/spec/unit/library_spec.rb index 8b5df6540..33bb292ed 100644 --- a/spec/unit/library_spec.rb +++ b/spec/unit/library_spec.rb @@ -82,7 +82,7 @@ def generate_software(name, version, dependencies = []) end it "returns an array of software descriptions, with all top level deps first" do - expect(library.build_order).to eq([ + expect(library.build_order.map(&:name)).to eq([ preparation, erlang, postgresql, @@ -90,7 +90,7 @@ def generate_software(name, version, dependencies = []) ruby, erchef, chef, - ]) + ].map(&:name)) end context "with a complex dep tree" do @@ -113,7 +113,7 @@ def generate_software(name, version, dependencies = []) end it "returns an array of software descriptions, with all top level deps first, assuming they are not themselves transitive deps" do - expect(library.build_order).to eql( + expect(library.build_order(&:name)).to eql( [ preparation, # first erlang, # via erchef project @@ -125,8 +125,7 @@ def generate_software(name, version, dependencies = []) erchef, # project dep chef, # project dep chefdk, # project dep - ] - ) + ].map(&:name)) end end end