Skip to content

Commit

Permalink
Workaround for a flaky test
Browse files Browse the repository at this point in the history
`[2/1]` and `[3/1]` may be detected incorrectly in multiple_assertions_test.rb of rubocop#224:
https://app.circleci.com/pipelines/github/rubocop/rubocop-minitest/853/workflows/3da99133-155c-4bca-8e92-4c3287b537b6/jobs/5481

Another essential fix is needed, but this commit prevents a flaky test by unifying to `[2/1]`.
  • Loading branch information
koic committed Jan 18, 2023
1 parent e5c736d commit 9fd0e88
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/rubocop/cop/minitest/multiple_assertions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ def test_registers_offense_when_multiple_expectations_with_block
assert_offense(<<~RUBY)
class FooTest < Minitest::Test
def test_asserts_three_times
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Test case has too many assertions [3/1].
assert_equal(foo, bar)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Test case has too many assertions [2/1].
assert_raises(SomeError) do
assert_equal(baz, bar)
end
Expand Down

0 comments on commit 9fd0e88

Please sign in to comment.