guilleiguaran/fakeredis — pull request #32 by caius (2012-07-13 11:37:56+00:00)
Title: Actual redis spec helper

The basic idea of this pull request is to pull the test suite & then the code of fakeredis inline with how redis-rb and redis-server actually behave themselves. I've done this by adding a second (optional) spec_helper that un-loads fakeredis and runs the rspec suite against a live redis-server instance. You can invoke this by doing `bundle exec rspec -r spec_helper_live_redis spec` to explicitly load it.

From there I've then amended the specs that fail against a live redis server, as they should behave the same as the live server. And then as the specs have changed, the fakeredis code needed amending to make the specs pass again with fakeredis loaded. I've also done that, so we have an rspec suite here that passes against a live redis-server instance, and fakeredis code that passes against the rspec suite.

Hope this isn't too much all in one pull request, I've tried to keep it as brief as possible whilst bringing it all inline!