Fix redis db option

This commit is contained in:
Konstantin Papkovskiy 2016-07-08 15:13:01 +03:00
parent f052d64d3b
commit 7906415de9

View file

@ -25,7 +25,7 @@ module DatabaseCleaner
@connection ||= begin @connection ||= begin
if url == :default if url == :default
::Redis.new ::Redis.new
elsif db.class.is_a?(::Redis) # pass directly the connection elsif db.is_a?(::Redis) # pass directly the connection
db db
else else
::Redis.new(:url => url) ::Redis.new(:url => url)