A platform for community discussion. Free, open, simple.
DEV: Reduce size of begin-rescue region
Daniel Waterworth368af327fada
diff --git a/lib/turbo_tests/runner.rb b/lib/turbo_tests/runner.rbindex 3faff70dc35..808e18a28ea 100644--- a/lib/turbo_tests/runner.rb+++ b/lib/turbo_tests/runner.rb@@ -87,14 +87,15 @@ module TurboTestsActiveRecord::Tasks::DatabaseTasks.migrations_paths = ['db/migrate', 'db/post_migrate']+ conn = ActiveRecord::Base.establish_connection(config).connection+begin- conn = ActiveRecord::Base.establish_connection(config).connectionActiveRecord::Migration.check_pending!(conn)rescue ActiveRecord::PendingMigrationErrorputs "There are pending migrations, run rake parallel:migrate"exit 1ensure- conn&.close+ conn.closeendend