Skip to content

Commit 701fd11

Browse files
committed
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 rsim#2418
1 parent e30b674 commit 701fd11

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

spec/active_record/connection_adapters/oracle_enhanced/compatibility_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ def change
2525
end
2626
}.new
2727

28-
migration.migrate(:up)
28+
ActiveRecord::Migration.suppress_messages do
29+
migration.migrate(:up)
30+
end
2931
expect(@conn.table_exists?(:new_test_employees)).to be_truthy
3032
expect(@conn.table_exists?(:test_employees)).not_to be_truthy
3133

32-
migration.migrate(:down)
34+
ActiveRecord::Migration.suppress_messages do
35+
migration.migrate(:down)
36+
end
3337
expect(@conn.table_exists?(:new_test_employees)).not_to be_truthy
3438
expect(@conn.table_exists?(:test_employees)).to be_truthy
3539
end

0 commit comments

Comments
 (0)