Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions spec/unit/library_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ 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,
skitch,
ruby,
erchef,
chef,
])
].map(&:name))
end

context "with a complex dep tree" do
Expand All @@ -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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deriamis should that be build_order.map(&:name) again, or am I missing something?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, you aren't missing anything. I am 🤡.

This is something I was moving over from something else I was doing, and I couldn't just cherry-pick it because it was part of something larger. Looks like I missed a couple of details. I'll push up a fix.

[
preparation, # first
erlang, # via erchef project
Expand All @@ -125,8 +125,7 @@ def generate_software(name, version, dependencies = [])
erchef, # project dep
chef, # project dep
chefdk, # project dep
]
)
].map(&:name))
end
end
end
Expand Down