Commit beb77711 authored by Rémy Coutable's avatar Rémy Coutable

test: Use match_array instead of eq when comparing arrays

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 1ee22091
...@@ -145,7 +145,7 @@ RSpec.shared_examples 'Debian Distribution' do |factory, container, can_freeze| ...@@ -145,7 +145,7 @@ RSpec.shared_examples 'Debian Distribution' do |factory, container, can_freeze|
subject { described_class.with_container(distribution_with_suite.container) } subject { described_class.with_container(distribution_with_suite.container) }
it 'does not return other distributions' do it 'does not return other distributions' do
expect(subject.to_a).to eq([distribution_with_suite, distribution, distribution_with_same_container]) expect(subject).to match_array([distribution_with_suite, distribution, distribution_with_same_container])
end end
end end
...@@ -153,7 +153,7 @@ RSpec.shared_examples 'Debian Distribution' do |factory, container, can_freeze| ...@@ -153,7 +153,7 @@ RSpec.shared_examples 'Debian Distribution' do |factory, container, can_freeze|
subject { described_class.with_codename(distribution_with_suite.codename) } subject { described_class.with_codename(distribution_with_suite.codename) }
it 'does not return other distributions' do it 'does not return other distributions' do
expect(subject.to_a).to eq([distribution_with_suite, distribution_with_same_codename]) expect(subject).to match_array([distribution_with_suite, distribution_with_same_codename])
end end
end end
...@@ -161,7 +161,7 @@ RSpec.shared_examples 'Debian Distribution' do |factory, container, can_freeze| ...@@ -161,7 +161,7 @@ RSpec.shared_examples 'Debian Distribution' do |factory, container, can_freeze|
subject { described_class.with_suite(distribution_with_suite.suite) } subject { described_class.with_suite(distribution_with_suite.suite) }
it 'does not return other distributions' do it 'does not return other distributions' do
expect(subject.to_a).to eq([distribution_with_suite, distribution_with_same_suite]) expect(subject).to match_array([distribution_with_suite, distribution_with_same_suite])
end end
end 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