Commit 6d232557 authored by Albert Salim's avatar Albert Salim

Fix flaky tests

It's sufficient to compare array contents
as they may not be in the same order
parent 3fbe31c1
......@@ -34,7 +34,7 @@ RSpec.shared_examples 'Debian Distribution Architecture' do |factory, container,
subject { described_class.with_distribution(architecture.distribution) }
it 'does not return other distributions' do
expect(subject.to_a).to eq([architecture, architecture_same_distribution])
expect(subject.to_a).to match_array([architecture, architecture_same_distribution])
end
end
......@@ -42,7 +42,7 @@ RSpec.shared_examples 'Debian Distribution Architecture' do |factory, container,
subject { described_class.with_name(architecture.name) }
it 'does not return other distributions' do
expect(subject.to_a).to eq([architecture, architecture_same_name])
expect(subject.to_a).to match_array([architecture, architecture_same_name])
end
end
end
......
......@@ -36,7 +36,7 @@ RSpec.shared_examples 'Debian Distribution Component' do |factory, container, ca
subject { described_class.with_distribution(component.distribution) }
it 'does not return other distributions' do
expect(subject.to_a).to eq([component, component_same_distribution])
expect(subject.to_a).to match_array([component, component_same_distribution])
end
end
......@@ -44,7 +44,7 @@ RSpec.shared_examples 'Debian Distribution Component' do |factory, container, ca
subject { described_class.with_name(component.name) }
it 'does not return other distributions' do
expect(subject.to_a).to eq([component, component_same_name])
expect(subject.to_a).to match_array([component, component_same_name])
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment