diff --git a/lib/mock_redis/list_methods.rb b/lib/mock_redis/list_methods.rb index 57f2347..412bbdf 100644 --- a/lib/mock_redis/list_methods.rb +++ b/lib/mock_redis/list_methods.rb @@ -108,9 +108,11 @@ def lmpop(*keys, **options) record_count = llen(key) next if record_count.zero? - [count, record_count].min.times.map do + values = [count, record_count].min.times.map do modifier == 'left' ? with_list_at(key, &:shift) : with_list_at(key, &:pop) end + + return [key, values] end nil