Skip to content

Commit ba1ec19

Browse files
authored
Merge pull request rails#42060 from Tonkpils/tonkpils/fix-enlist-fixture-connections
Ensure variables are set in case enlist_fixture_connections is called
2 parents 0beae87 + e088454 commit ba1ec19

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

activerecord/lib/active_record/test_fixtures.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,11 @@ def setup_fixtures(config = ActiveRecord::Base)
111111
@fixture_connections = []
112112
@@already_loaded_fixtures ||= {}
113113
@connection_subscriber = nil
114+
@legacy_saved_pool_configs = Hash.new { |hash, key| hash[key] = {} }
115+
@saved_pool_configs = Hash.new { |hash, key| hash[key] = {} }
114116

115117
# Load fixtures once and begin transaction.
116118
if run_in_transaction?
117-
@legacy_saved_pool_configs = Hash.new { |hash, key| hash[key] = {} }
118-
@saved_pool_configs = Hash.new { |hash, key| hash[key] = {} }
119-
120119
if @@already_loaded_fixtures[self.class]
121120
@loaded_fixtures = @@already_loaded_fixtures[self.class]
122121
else

0 commit comments

Comments
 (0)