From 6cfe0949d2d4ab089387d7ae1e27f21f271fe1f4 Mon Sep 17 00:00:00 2001 From: Orien Madgwick <_@orien.io> Date: Tue, 7 Apr 2015 22:54:45 +1000 Subject: [PATCH] Ensure @cleaners has been defined before reading --- lib/database_cleaner/configuration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/database_cleaner/configuration.rb b/lib/database_cleaner/configuration.rb index 6fb1e06..24ddaf2 100644 --- a/lib/database_cleaner/configuration.rb +++ b/lib/database_cleaner/configuration.rb @@ -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