diff --git a/activerecord/lib/active_record/test_fixtures.rb b/activerecord/lib/active_record/test_fixtures.rb index b8c30f86e0ec4..58c66df685cb1 100644 --- a/activerecord/lib/active_record/test_fixtures.rb +++ b/activerecord/lib/active_record/test_fixtures.rb @@ -111,12 +111,11 @@ def setup_fixtures(config = ActiveRecord::Base) @fixture_connections = [] @@already_loaded_fixtures ||= {} @connection_subscriber = nil + @legacy_saved_pool_configs = Hash.new { |hash, key| hash[key] = {} } + @saved_pool_configs = Hash.new { |hash, key| hash[key] = {} } # Load fixtures once and begin transaction. if run_in_transaction? - @legacy_saved_pool_configs = Hash.new { |hash, key| hash[key] = {} } - @saved_pool_configs = Hash.new { |hash, key| hash[key] = {} } - if @@already_loaded_fixtures[self.class] @loaded_fixtures = @@already_loaded_fixtures[self.class] else