-
Edouard CHIN authored
- ### Problem Using the `assert_recognizes` assertion will throw a warning message saying "the test is missing an assertion". This is because raising a `Minitest::Assertion` error directly (instead of using a built-in Minitest assertion method), doesn't increment the `Test#assertions` count which is later used by the TestsWithoutAssertions feature https://github.com/rails/rails/blob/8e504b017a68981076746c2d19fd23c788e4293e/activesupport/lib/active_support/testing/tests_without_assertions.rb#L8-L12. ### Solution Use `flunk` instead of raising. I don't think it's worth changing the `TestsWithoutAssertions` feature, as I don't see the point of raising a `Minitest:Assertion` error anyway.
Edouard CHIN authored- ### Problem Using the `assert_recognizes` assertion will throw a warning message saying "the test is missing an assertion". This is because raising a `Minitest::Assertion` error directly (instead of using a built-in Minitest assertion method), doesn't increment the `Test#assertions` count which is later used by the TestsWithoutAssertions feature https://github.com/rails/rails/blob/8e504b017a68981076746c2d19fd23c788e4293e/activesupport/lib/active_support/testing/tests_without_assertions.rb#L8-L12. ### Solution Use `flunk` instead of raising. I don't think it's worth changing the `TestsWithoutAssertions` feature, as I don't see the point of raising a `Minitest:Assertion` error anyway.
Loading