diff --git a/test/cases/coerced_tests.rb b/test/cases/coerced_tests.rb index e6cc9e24e..9e0e660f8 100644 --- a/test/cases/coerced_tests.rb +++ b/test/cases/coerced_tests.rb @@ -97,6 +97,13 @@ def test_errors_when_an_insert_query_prefixed_by_a_double_dash_comment_is_called module ActiveRecord class AdapterPreventWritesLegacyTest < ActiveRecord::TestCase + # Fix randomly failing test. The loading of the model's schema was affecting the test. + coerce_tests! :test_errors_when_an_insert_query_is_called_while_preventing_writes + def test_errors_when_an_insert_query_is_called_while_preventing_writes_coerced + Subscriber.send(:load_schema!) + original_test_errors_when_an_insert_query_is_called_while_preventing_writes + end + # Fix randomly failing test. The loading of the model's schema was affecting the test. coerce_tests! :test_errors_when_an_insert_query_prefixed_by_a_slash_star_comment_is_called_while_preventing_writes def test_errors_when_an_insert_query_prefixed_by_a_slash_star_comment_is_called_while_preventing_writes_coerced