Skip to content

Commit 296ea75

Browse files
committed
[test] fix accessing db config hash
1 parent c6f2e77 commit 296ea75

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

test/db/mysql/change_column_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ class MySQLChangeColumnTest < Test::Unit::TestCase
3838
def run_without_connection
3939
original_connection = ActiveRecord::Base.remove_connection
4040
begin
41-
yield original_connection
41+
yield original_connection.configuration_hash
4242
ensure
4343
ActiveRecord::Base.establish_connection(original_connection)
4444
end
4545
end
4646

47-
end
47+
end

test/db/mysql/connection_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def select_rows(sql)
4343
def run_without_connection
4444
original_connection = ActiveRecord::Base.remove_connection
4545
begin
46-
yield original_connection
46+
yield original_connection.configuration_hash
4747
ensure
4848
ActiveRecord::Base.establish_connection(original_connection)
4949
end

test/db/postgresql/redshift_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def show_time_zone(connection = self.connection)
4242
def run_with_connection_removed
4343
config = ActiveRecord::Base.remove_connection
4444
begin
45-
yield config
45+
yield config.configuration_hash
4646
ensure
4747
ActiveRecord::Base.establish_connection(config)
4848
end

0 commit comments

Comments
 (0)