mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
Merge pull request #353 from orien/fix_ruby_warning
Ensure @cleaners has been defined before reading
This commit is contained in:
commit
19773bbd1c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue