guilleiguaran/fakeredis — pull request #110 by macb (2014-06-05 04:01:53+00:00)
Title: Expire returns 1 and 0, not true and nil.

Found another case of an incorrect return value.

The `EXPIRE` command returns `0` and `1`. The `redis` gem then converts `0` and `1` responses to booleans with: https://github.com/redis/redis-rb/blob/master/lib/redis.rb#L307-L311

This PR corrects the return value of fakeredis' `expire` to return what redis would, `0` or `1`. This results in the `redis` gem correctly converting the response to a boolean.

I noticed this behavior as part of a `multi` so I added it to that example just to be safe, but also created entries in the `keys_spec.rb`.