spec/commands/geopos_spec.rb in mock_redis-0.19.0 vs spec/commands/geopos_spec.rb in mock_redis-0.20.0
- old
+ new
@@ -18,38 +18,38 @@
%w[-118.69192510843276978 34.020729570911179]
]
end
it 'returns decoded coordinates pairs for each point' do
- coords = @redises.geopos(key, 'SF', 'LA')
+ coords = @redises.geopos(key, %w[SF LA])
expect(coords).to be == expected_result
end
context 'with non-existing points only' do
it 'returns array filled with nils' do
- coords = @redises.geopos(key, 'FF', 'FA')
+ coords = @redises.geopos(key, %w[FF FA])
expect(coords).to be == [nil, nil]
end
end
context 'with both existing and non-existing points' do
let(:expected_result) do
[%w[-122.5076410174369812 37.75781598995183685], nil]
end
it 'returns mixture of nil and coordinates pair' do
- coords = @redises.geopos(key, 'SF', 'FA')
+ coords = @redises.geopos(key, %w[SF FA])
expect(coords).to be == expected_result
end
end
end
end
context 'with non-existing key' do
before { @redises.del(key) }
it 'returns empty array' do
- coords = @redises.geopos(key, 'SF', 'LA')
+ coords = @redises.geopos(key, %w[SF LA])
expect(coords).to be == [nil, nil]
end
end
end