aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r--activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb3
-rw-r--r--activerecord/test/cases/adapters/mysql2/connection_test.rb3
-rw-r--r--activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb3
3 files changed, 6 insertions, 3 deletions
diff --git a/activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb b/activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
index a85f3d4298..605a2d86e4 100644
--- a/activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
+++ b/activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
@@ -18,7 +18,8 @@ module ActiveRecord
def test_bad_connection_mysql
assert_raise ActiveRecord::NoDatabaseError do
- connection = ActiveRecord::Base.mysql_connection(adapter: "mysql", database: "should_not_exist-cinco-dog-db")
+ configuration = ActiveRecord::Base.configurations['arunit'].merge(database: 'should_not_exist-cinco-dog-db')
+ connection = ActiveRecord::Base.mysql_connection(configuration)
connection.exec_query('drop table if exists ex')
end
end
diff --git a/activerecord/test/cases/adapters/mysql2/connection_test.rb b/activerecord/test/cases/adapters/mysql2/connection_test.rb
index 91b780a7ee..8fe8bd7df3 100644
--- a/activerecord/test/cases/adapters/mysql2/connection_test.rb
+++ b/activerecord/test/cases/adapters/mysql2/connection_test.rb
@@ -15,7 +15,8 @@ class MysqlConnectionTest < ActiveRecord::TestCase
def test_bad_connection
assert_raise ActiveRecord::NoDatabaseError do
- connection = ActiveRecord::Base.mysql2_connection(adapter: "mysql2", database: "should_not_exist-cinco-dog-db")
+ configuration = ActiveRecord::Base.configurations['arunit'].merge(database: 'should_not_exist-cinco-dog-db')
+ connection = ActiveRecord::Base.mysql2_connection(configuration)
connection.exec_query('drop table if exists ex')
end
end
diff --git a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb
index 778175e2e8..131080913c 100644
--- a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb
@@ -12,7 +12,8 @@ module ActiveRecord
def test_bad_connection
assert_raise ActiveRecord::NoDatabaseError do
- connection = ActiveRecord::Base.postgresql_connection(database: "should_not_exist-cinco-dog-db", adapter: "postgresql")
+ configuration = ActiveRecord::Base.configurations['arunit'].merge(database: 'should_not_exist-cinco-dog-db')
+ connection = ActiveRecord::Base.postgresql_connection(configuration)
connection.exec_query('drop table if exists ex')
end
end