causes/mock_redis — pull request #23 by madlep (2012-08-20 13:38:12+00:00)
Title: Pipelined returns results

Change so `pipelined` returns an array of results of the operations undertaken inside the array. The previous implementation of `pipelined` in MockRedis just yielded the passed in block, but didn't collect or return the results consistent with redis-rb.

This lets code like this work

redis.set "hello", "world"
redis.set "foo", "bar"

results = redis.pipelined do
redis.get "hello"
redis.get "foo"
end

# results == ["world", "bar']

Interested in using mock_redis in current project. But I dropped it in to run my specs, and this was the first thing that broke on me :)