mirror of https://github.com/rails/rails
Connect to the DB at the bottom of AR::TestCase class definition
This commit is contained in:
parent
4ba87aae1f
commit
946bc94e82
|
@ -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")
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue