diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-07-10 19:27:04 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-07-10 19:27:04 +0000 |
commit | 41f3b7ab56d1c90454c0c5db6cbf3e8982ac0f34 (patch) | |
tree | b580ea8b2672442652bb9c3c527809da570b03eb /activerecord/test/connections/native_db2/connection.rb | |
parent | 5ad4f1ad94c71bfbb6aacc8a27addc4a0de54506 (diff) | |
download | rails-41f3b7ab56d1c90454c0c5db6cbf3e8982ac0f34.tar.gz rails-41f3b7ab56d1c90454c0c5db6cbf3e8982ac0f34.tar.bz2 rails-41f3b7ab56d1c90454c0c5db6cbf3e8982ac0f34.zip |
Test connections use AR::Base.configurations. References #5497.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4602 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/connections/native_db2/connection.rb')
-rw-r--r-- | activerecord/test/connections/native_db2/connection.rb | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/activerecord/test/connections/native_db2/connection.rb b/activerecord/test/connections/native_db2/connection.rb index aa736ccc85..921ac28109 100644 --- a/activerecord/test/connections/native_db2/connection.rb +++ b/activerecord/test/connections/native_db2/connection.rb @@ -4,21 +4,22 @@ require 'logger' ActiveRecord::Base.logger = Logger.new("debug.log") -db1 = 'arunit' -db2 = 'arunit2' +ActiveRecord::Base.configurations = { + 'arunit' => { + :adapter => 'db2', + :host => 'localhost', + :username => 'arunit', + :password => 'arunit', + :database => 'arunit' + }, + 'arunit2' => { + :adapter => 'db2', + :host => 'localhost', + :username => 'arunit', + :password => 'arunit', + :database => 'arunit2' + } +} -ActiveRecord::Base.establish_connection( - :adapter => "db2", - :host => "localhost", - :username => "arunit", - :password => "arunit", - :database => db1 -) - -Course.establish_connection( - :adapter => "db2", - :host => "localhost", - :username => "arunit2", - :password => "arunit2", - :database => db2 -) +ActiveRecord::Base.establish_connection 'arunit' +Course.establish_connection 'arunit2' |