lib/fakeredis/rspec.rb in fakeredis-0.4.0 vs lib/fakeredis/rspec.rb in fakeredis-0.4.1

- old
+ new

@@ -1,24 +1,23 @@ -# Require this either in your Gemfile or in RSpec's -# support scripts. Examples: +# Require this either in your Gemfile or in RSpec's +# support scripts. Examples: # # # Gemfile # group :test do # gem "rspec" # gem "fakeredis", :require => "fakeredis/rspec" -# end +# end # # # spec/support/fakeredis.rb # require 'fakeredis/rspec' # require 'rspec/core' require 'fakeredis' RSpec.configure do |c| - + c.before do - redis = Redis.current - redis.flushdb if redis.client.connection.is_a?(Redis::Connection::Memory) + Redis::Connection::Memory.instances.values.each &:flushdb end - + end