From 701fd1162bec263d45f1522409ae17e73fd7af57 Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Mon, 23 Jun 2025 20:47:59 +0900 Subject: [PATCH] Suppress messages for the "should rename table on 7_0 and below" spec This commit suppresses the following migration standard output. ```ruby $ bundle exec rspec spec/active_record/connection_adapters/oracle_enhanced/compatibility_spec.rb:21 ==> Loading config from ENV or use default ==> Running specs with ruby version 3.4.4 ==> Effective ActiveRecord version 8.0.2 Run options: include {locations: {"./spec/active_record/connection_adapters/oracle_enhanced/compatibility_spec.rb" => [21]}} == : migrating =============================================================== -- rename_table(:test_employees, :new_test_employees) -> 0.2045s == : migrated (0.2045s) ====================================================== == : reverting =============================================================== -- rename_table(:new_test_employees, :test_employees) -> 0.2033s == : reverted (0.2046s) ====================================================== . Finished in 0.68775 seconds (files took 0.34644 seconds to load) 1 example, 0 failures $ ``` Follow up #2418 --- .../oracle_enhanced/compatibility_spec.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spec/active_record/connection_adapters/oracle_enhanced/compatibility_spec.rb b/spec/active_record/connection_adapters/oracle_enhanced/compatibility_spec.rb index f2916fe9d..714c1c218 100644 --- a/spec/active_record/connection_adapters/oracle_enhanced/compatibility_spec.rb +++ b/spec/active_record/connection_adapters/oracle_enhanced/compatibility_spec.rb @@ -25,11 +25,15 @@ def change end }.new - migration.migrate(:up) + ActiveRecord::Migration.suppress_messages do + migration.migrate(:up) + end expect(@conn.table_exists?(:new_test_employees)).to be_truthy expect(@conn.table_exists?(:test_employees)).not_to be_truthy - migration.migrate(:down) + ActiveRecord::Migration.suppress_messages do + migration.migrate(:down) + end expect(@conn.table_exists?(:new_test_employees)).not_to be_truthy expect(@conn.table_exists?(:test_employees)).to be_truthy end