Ensure @cleaners has been defined before reading

This commit is contained in:
Orien Madgwick 2015-04-07 22:54:45 +10:00
parent bb608dd3ac
commit 6cfe0949d2

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