-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minitest/AssertTruthy
should be marked as unsafe for autocorrection
#209
Labels
bug
Something isn't working
Comments
koic
added a commit
to koic/rubocop-minitest
that referenced
this issue
Dec 30, 2022
Fixes rubocop#209. This PR marks `Minitest/AssertTruthy` as unsafe autocorrection.
8 tasks
koic
added a commit
that referenced
this issue
Dec 30, 2022
…fe_autocorrection [Fix #209] Mark `Minitest/AssertTruthy` as unsafe autocorrection
I think |
koic
added a commit
to koic/rubocop-minitest
that referenced
this issue
Jan 21, 2023
This PR marks `Minitest/RefuteFalse` as unsafe autocorrection. rubocop#209 (comment)
koic
added a commit
to koic/rubocop-minitest
that referenced
this issue
Jan 21, 2023
Follow up rubocop#209 (comment) This PR marks `Minitest/RefuteFalse` as unsafe autocorrection.
koic
added a commit
to koic/rubocop-minitest
that referenced
this issue
Jan 21, 2023
Follow up rubocop#209 (comment) This PR marks `Minitest/RefuteFalse` as unsafe.
koic
added a commit
to koic/rubocop-minitest
that referenced
this issue
Jan 21, 2023
Follow up rubocop#209 (comment) This PR marks `Minitest/RefuteFalse` as unsafe.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the intention is to check for a
true
/false
value rather than truthy or falsey, then the autocorrection could result in a test passing when it shouldn't.Expected behavior
assert_equal true, item.flagged
should not be autocorrected.Actual behavior
It is auto-corrected to
assert item.flagged
. So the test would still pass even ifflagged
returned a string.RuboCop version
rubocop-minitest (0.25.1)
The text was updated successfully, but these errors were encountered: