From 53950f7d170080c653bf36fee63b4d19e4c1344e Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Mon, 19 Feb 2024 18:57:27 -0500 Subject: [PATCH] rubocop: Prefer contain_exactly over match_array --- .../trie/configuration/properties_spec.rb | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/spec/lib/rambling/trie/configuration/properties_spec.rb b/spec/lib/rambling/trie/configuration/properties_spec.rb index ace496c1..a3fb1699 100644 --- a/spec/lib/rambling/trie/configuration/properties_spec.rb +++ b/spec/lib/rambling/trie/configuration/properties_spec.rb @@ -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 @@ -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