aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/connections/native_db2
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/connections/native_db2')
-rw-r--r--activerecord/test/connections/native_db2/connection.rb35
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'