File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
activesupport/lib/active_support/testing Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -503,7 +503,9 @@ def test_saving_a_record_with_a_belongs_to_that_specifies_touching_the_parent_sh
503
503
504
504
def test_saving_two_records_that_override_object_id_should_run_after_commit_callbacks_for_both
505
505
klass = Class . new ( TopicWithCallbacks ) do
506
- define_method ( :object_id ) { 42 }
506
+ silence_warnings do
507
+ define_method ( :object_id ) { 42 }
508
+ end
507
509
end
508
510
509
511
records = [ klass . new , klass . new ]
@@ -521,7 +523,9 @@ def test_saving_two_records_that_override_object_id_should_run_after_commit_call
521
523
522
524
def test_saving_two_records_that_override_object_id_should_run_after_rollback_callbacks_for_both
523
525
klass = Class . new ( TopicWithCallbacks ) do
524
- define_method ( :object_id ) { 42 }
526
+ silence_warnings do
527
+ define_method ( :object_id ) { 42 }
528
+ end
525
529
end
526
530
527
531
records = [ klass . new , klass . new ]
Original file line number Diff line number Diff line change @@ -17,9 +17,6 @@ class WarningError < StandardError; end
17
17
18
18
# TODO: We need to decide what to do with this.
19
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}
23
20
)
24
21
25
22
SUPPRESSED_WARNINGS = Regexp . union (
You can’t perform that action at this time.
0 commit comments