-
-
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/LiteralAsActualArgument
infinitely loops when both args are literals.
#143
Comments
Not sure I understand, what would be the benefit in that?
It's probably not feasible to determine the author's intention so I'd say that's not safe. |
(Thanks for the report!) |
None-what-so-ever, but it wouldn't be a crasher :)
If someone wrote |
…est` Fixes rubocop#143. This PR fixes an error for `Minitest/LiteralAsActualArgumentTest` when expected and actual arguments are literals.
…est` Fixes rubocop#143. This PR fixes an error for `Minitest/LiteralAsActualArgumentTest` when expected and actual arguments are literals.
…est` Fixes rubocop#143. This PR fixes an error for `Minitest/LiteralAsActualArgumentTest` when expected and actual arguments are literals.
…ctual_argument [Fix #143] Fix an error for `Minitest/LiteralAsActualArgumentTest`
I ran across a piece of code in which someone was trying to assert that a block would never be called. It looks like they didn't know about
#flunk
, so they used this instead:While this is odd code that should be fixed, it shouldn't crash the cop.
Expected behavior
Several behaviours seem reasonable to me:
flunk
if they're unequalActual behavior
Steps to reproduce the problem
On a file that contains an assertion with two literal args (like shown above), run:
RuboCop version
The text was updated successfully, but these errors were encountered: