Skip to content

Commit ed18925

Browse files
committed
Allow warning: redefining 'object_id' may cause serious problems in the TransactionCallbacksTest
This commit allows the `warning: redefining 'object_id' may cause serious problems` in the `TransactionCallbacksTest` that have been added via rails#38990 . I prefer not to allow `warning: redefining 'object_id' may cause serious problems` warning everywhere because generally overriding object_id should not be done. Refer to ruby/ruby#11834 Fix rails#53266
1 parent fdeba4a commit ed18925

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

activesupport/lib/active_support/testing/strict_warnings.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ class WarningError < StandardError; end
1616
/Failed to validate the schema cache because/,
1717

1818
# TODO: We need to decide what to do with this.
19-
/Status code :unprocessable_entity is deprecated/
19+
/Status code :unprocessable_entity is deprecated/,
20+
21+
# Allow this warning only in the `TransactionCallbacksTest`.
22+
%r{.*/rails/activerecord/test/cases/transaction_callbacks_test\.rb:\d+: warning: redefining 'object_id' may cause serious problems}
2023
)
2124

2225
SUPPRESSED_WARNINGS = Regexp.union(

0 commit comments

Comments
 (0)