Merge pull request #353 from orien/fix_ruby_warning

Ensure @cleaners has been defined before reading
This commit is contained in:
Ernesto Tagwerker 2015-04-20 17:32:39 -03:00
commit 19773bbd1c

View file

@ -42,7 +42,7 @@ module DatabaseCleaner
def connections
# double yuck.. can't wait to deprecate this whole class...
unless @cleaners
unless defined?(@cleaners) && @cleaners
autodetected = ::DatabaseCleaner::Base.new
add_cleaner(autodetected.orm)
end