Skip to content

Commit

Permalink
Fix lmpop lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Palladinium committed Nov 27, 2024
1 parent 7cf1f6d commit 1940c89
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spec/commands/lmpop_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@
end

it 'returns and removes multiple elements from the front when count is given' do
expect(@redises.lmpop('empty', @list1, @list2, count: 2)).to eq([@list1, ['a', 'b']])
expect(@redises.lmpop('empty', @list1, @list2, count: 2)).to eq([@list1, %w[a b]])

expect(@redises.lrange(@list1, 0, -1)).to eq(%w[c])
expect(@redises.lrange(@list2, 0, -1)).to eq(%w[x y z])
end

it 'returns and removes multiple elements from the back when count is given and modifier is RIGHT' do
expect(@redises.lmpop('empty', @list1, @list2, count: 2, modifier: 'RIGHT')).to eq([@list1, ['c', 'b']])
it 'returns and removes multiple elements from the back when count given and modifier is RIGHT' do
expect(@redises.lmpop('empty', @list1, @list2, count: 2, modifier: 'RIGHT')).to(
eq([@list1, %w[c b]])
)

expect(@redises.lrange(@list1, 0, -1)).to eq(%w[a])
expect(@redises.lrange(@list2, 0, -1)).to eq(%w[x y z])
Expand Down

0 comments on commit 1940c89

Please sign in to comment.