diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index 31c5fa4db58..0dc7be2adc8 100644 --- a/activerecord/test/cases/helper.rb +++ b/activerecord/test/cases/helper.rb @@ -11,9 +11,6 @@ require "active_support/logger" require "active_support/core_ext/kernel/reporting" require "active_support/core_ext/kernel/singleton_class" -require "support/config" -require "support/connection" - # TODO: Move all these random hacks into the ARTest namespace and into the support/ dir Thread.abort_on_exception = true @@ -24,9 +21,6 @@ ActiveRecord.deprecator.debug = true # Disable available locale checks to avoid warnings running the test suite. I18n.enforce_available_locales = false -# Connect to the database -ARTest.connect - # Quote "type" if it's a reserved word for the current connection. QUOTED_TYPE = ActiveRecord::Base.connection.quote_column_name("type") diff --git a/activerecord/test/cases/test_case.rb b/activerecord/test/cases/test_case.rb index 1985a3c7ba7..58b9b8ede08 100644 --- a/activerecord/test/cases/test_case.rb +++ b/activerecord/test/cases/test_case.rb @@ -8,6 +8,8 @@ require "active_support/testing/stream" require "active_record/fixtures" require "cases/validations_repair_helper" +require_relative "../support/config" +require_relative "../support/connection" require_relative "../support/adapter_helper" module ActiveRecord @@ -220,6 +222,9 @@ module ActiveRecord end end end + + # Connect to the database + ARTest.connect end class PostgreSQLTestCase < TestCase