From 41f3b7ab56d1c90454c0c5db6cbf3e8982ac0f34 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 10 Jul 2006 19:27:04 +0000 Subject: Test connections use AR::Base.configurations. References #5497. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4602 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../connections/native_postgresql/connection.rb | 33 +++++++++++----------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'activerecord/test/connections/native_postgresql/connection.rb') diff --git a/activerecord/test/connections/native_postgresql/connection.rb b/activerecord/test/connections/native_postgresql/connection.rb index 1bdff730b1..a75fc6e2ae 100644 --- a/activerecord/test/connections/native_postgresql/connection.rb +++ b/activerecord/test/connections/native_postgresql/connection.rb @@ -4,21 +4,20 @@ require 'logger' ActiveRecord::Base.logger = Logger.new("debug.log") -db1 = 'activerecord_unittest' -db2 = 'activerecord_unittest2' +ActiveRecord::Base.configurations = { + 'arunit' => { + :adapter => 'postgresql', + :username => 'postgres', + :database => 'activerecord_unittest', + :min_messages => 'warning' + }, + 'arunit2' => { + :adapter => 'postgresql', + :username => 'postgres', + :database => 'activerecord_unittest2', + :min_messages => 'warning' + } +} -ActiveRecord::Base.establish_connection( - :adapter => "postgresql", - :username => "postgres", - :password => "postgres", - :database => db1, - :min_messages => "warning" -) - -Course.establish_connection( - :adapter => "postgresql", - :username => "postgres", - :password => "postgres", - :database => db2, - :min_messages => "warning" -) +ActiveRecord::Base.establish_connection 'arunit' +Course.establish_connection 'arunit2' -- cgit v1.2.3