Skip to content

Commit 34b9273

Browse files
author
Aidan Haran
committed
Load schema before running Rails test
1 parent 0e0da50 commit 34b9273

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/cases/coerced_tests.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ def test_errors_when_an_insert_query_is_called_while_preventing_writes_coerced
5252
Subscriber.send(:load_schema!)
5353
original_test_errors_when_an_insert_query_is_called_while_preventing_writes
5454
end
55+
56+
# Fix randomly failing test. The loading of the model's schema was affecting the test.
57+
coerce_tests! :test_errors_when_an_insert_query_prefixed_by_a_double_dash_comment_containing_read_command_is_called_while_preventing_writes
58+
def test_errors_when_an_insert_query_prefixed_by_a_double_dash_comment_containing_read_command_is_called_while_preventing_writes_coerced
59+
Subscriber.send(:load_schema!)
60+
original_test_errors_when_an_insert_query_prefixed_by_a_double_dash_comment_containing_read_command_is_called_while_preventing_writes
61+
end
5562
end
5663
end
5764

0 commit comments

Comments
 (0)