causes/mock_redis — pull request #28 by chastell (2012-09-18 18:16:51+00:00)
Title: Minimal WATCH support

Currently MockRedis returns `nil` on `#watch` calls, which means any blocks passed to `#watch` are happily ignored.

This pull request adds minimal `WATCH` support (by simply `yield`ing the passed block). It’s far from ideal (it doesn’t track the watched key changes at all), but I think it’s still better than the current ‘no action’ approach; in particular, it makes my tests that use MockRedis pass when encountering `#watch`-using code, rather than ignoring the passed block silently and blowing up sometime later. :)