Skip to content

Commit

Permalink
rubocop: Prefer contain_exactly over match_array
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzedge committed Feb 20, 2024
1 parent a3175d9 commit 53950f7
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions spec/lib/rambling/trie/configuration/properties_spec.rb
Expand Up @@ -11,17 +11,13 @@
expect(serializers.formats).to match_array %i(marshal yaml yml zip)
end

# rubocop:disable RSpec/ExampleLength
it 'configures the serializer providers' do
serializers = properties.serializers
expect(serializers.providers.to_a).to match_array [
[:marshal, Rambling::Trie::Serializers::Marshal],
[:yaml, Rambling::Trie::Serializers::Yaml],
[:yml, Rambling::Trie::Serializers::Yaml],
[:zip, Rambling::Trie::Serializers::Zip],
]
expect(serializers.providers.to_a).to contain_exactly(
[:marshal, Rambling::Trie::Serializers::Marshal], [:yaml, Rambling::Trie::Serializers::Yaml],
[:yml, Rambling::Trie::Serializers::Yaml], [:zip, Rambling::Trie::Serializers::Zip]
)
end
# rubocop:enable RSpec/ExampleLength

it 'configures the reader formats' do
readers = properties.readers
Expand All @@ -30,9 +26,7 @@

it 'configures the reader providers' do
readers = properties.readers
expect(readers.providers.to_a).to match_array [
[:txt, Rambling::Trie::Readers::PlainText],
]
expect(readers.providers.to_a).to contain_exactly([:txt, Rambling::Trie::Readers::PlainText])
end

it 'configures the compressor' do
Expand Down

0 comments on commit 53950f7

Please sign in to comment.