diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 51202b3f92..af222e38e4 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -505,7 +505,7 @@ module Test #:nodoc: end def setup_with_fixtures - return unless defined?(ActiveRecord::Base) + return unless defined?(ActiveRecord::Base) && !ActiveRecord::Base.configurations.blank? if pre_loaded_fixtures && !use_transactional_fixtures raise RuntimeError, 'pre_loaded_fixtures requires use_transactional_fixtures' @@ -537,7 +537,7 @@ module Test #:nodoc: alias_method :setup, :setup_with_fixtures def teardown_with_fixtures - return unless defined?(ActiveRecord::Base) + return unless defined?(ActiveRecord::Base) && !ActiveRecord::Base.configurations.blank? # Rollback changes. if use_transactional_fixtures?