Skip to content

Commit d54f0c5

Browse files
committed
Minor cleanup from rails#46097
1) We don't need this comment 2) The begin/end was redudant and not necessary
1 parent a744d47 commit d54f0c5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

activerecord/lib/active_record/migration.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,6 @@ def load_schema_if_pending!
657657
# Establish a new connection, the old database may be gone (db:test:prepare uses purge)
658658
Base.establish_connection(current_db_config)
659659

660-
# Ensure all migrations have succeeded
661660
check_pending_migrations(db_configs: all_configs)
662661
end
663662

activerecord/test/cases/migration/pending_migrations_test.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,9 @@ def test_with_multiple_database
114114
CheckPending.new(@app).call({})
115115
end
116116

117-
begin
118-
ActiveRecord::Base.establish_connection(:secondary)
119-
quietly { run_migrations }
120-
end
117+
ActiveRecord::Base.establish_connection(:secondary)
118+
quietly { run_migrations }
119+
121120
ActiveRecord::Base.establish_connection(:primary)
122121

123122
@app.expect :call, nil, [{}]

0 commit comments

Comments
 (0)