Skip to content

Commit 46d6637

Browse files
committed
Fix failing framework test where ActiveRecord::DatabaseConnectionError
errors are not being rescued correctly
1 parent 6ec669b commit 46d6637

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

railties/test/application/initializers/frameworks_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def show
263263
require "#{app_path}/config/environment"
264264

265265
assert_nil ActiveRecord::Base.connection_pool.schema_cache
266-
assert_raises ActiveRecord::ConnectionNotEstablished do
266+
assert_raises ActiveRecord::DatabaseConnectionError do
267267
ActiveRecord::Base.connection.execute("SELECT 1")
268268
end
269269
end
@@ -295,7 +295,7 @@ def show
295295
require "#{app_path}/config/environment"
296296

297297
assert ActiveRecord::Base.connection_pool.schema_cache.data_sources("posts")
298-
assert_raises ActiveRecord::ConnectionNotEstablished do
298+
assert_raises ActiveRecord::DatabaseConnectionError do
299299
ActiveRecord::Base.connection.execute("SELECT 1")
300300
end
301301
end

0 commit comments

Comments
 (0)