Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a small quality-of-life change for tests #1147

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
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
8 changes: 4 additions & 4 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.map(&:name)).to eql(
[
preparation, # first
erlang, # via erchef project
Expand All @@ -125,7 +125,7 @@ def generate_software(name, version, dependencies = [])
erchef, # project dep
chef, # project dep
chefdk, # project dep
]
].map(&:name)
)
end
end
Expand Down