diff options
Diffstat (limited to 'activerecord/test/support/connection.rb')
-rw-r--r-- | activerecord/test/support/connection.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/activerecord/test/support/connection.rb b/activerecord/test/support/connection.rb index a39794fa39..c176316a05 100644 --- a/activerecord/test/support/connection.rb +++ b/activerecord/test/support/connection.rb @@ -1,4 +1,5 @@ -require 'logger' +require 'active_support/logger' +require_dependency 'models/college' require_dependency 'models/course' module ARTest @@ -11,10 +12,10 @@ module ARTest end def self.connect - puts "Using #{connection_name} with Identity Map #{ActiveRecord::IdentityMap.enabled? ? 'on' : 'off'}" - ActiveRecord::Base.logger = Logger.new("debug.log") - ActiveRecord::Base.configurations = connection_config - ActiveRecord::Base.establish_connection 'arunit' - Course.establish_connection 'arunit2' + puts "Using #{connection_name}" + ActiveRecord::Model.logger = ActiveSupport::Logger.new("debug.log") + ActiveRecord::Model.configurations = connection_config + ActiveRecord::Model.establish_connection 'arunit' + ARUnit2Model.establish_connection 'arunit2' end end |