-
-
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/GlobalExpectations autocorrect fails with lambdas #142
Comments
I also did a full rubocop autocorrect, which created
also failing with
|
gi
added a commit
to gi/rubocop-minitest
that referenced
this issue
Oct 18, 2021
…ver is lambda This fixes an issue when autocorrecting offenses where the receiver is a lambda function: `-> { n }`. The expected correct result is `_ { n }` instead of `_ { -> { n } }`.
gi
added a commit
to gi/rubocop-minitest
that referenced
this issue
Oct 18, 2021
…ver is lambda This fixes an issue when autocorrecting offenses where the receiver is a lambda function: `-> { n }`. The expected correct result is `_ { n }` instead of `_ { -> { n } }`.
gi
added a commit
to gi/rubocop-minitest
that referenced
this issue
Oct 18, 2021
…ver is lambda This fixes an issue when autocorrecting offenses where the receiver is a lambda function: `-> { n }`. The expected correct result is `_ { n }` instead of `_ { -> { n } }`.
gi
added a commit
to gi/rubocop-minitest
that referenced
this issue
Oct 18, 2021
…ver is lambda This fixes an issue when autocorrecting offenses where the receiver is a lambda function: `-> { n }`. The expected correct result is `_ { n }` instead of `_ { -> { n } }`. Fixes rubocop#142
8 tasks
gi
added a commit
to gi/rubocop-minitest
that referenced
this issue
Oct 19, 2021
…ver is lambda This fixes an issue when autocorrecting offenses where the receiver is a lambda function: `-> { n }`. The expected correct result is `_ { n }` instead of `_ { -> { n } }`. Fixes rubocop#142
koic
added a commit
that referenced
this issue
Oct 19, 2021
…rect-lambda-receiver [Fix #142] Minitest/GlobalExpectations: autocorrect when receiver is lambda
gi
added a commit
to gi/rubocop-minitest
that referenced
this issue
Oct 19, 2021
…nfig parameter Add a new configuration value for Minitest/GlobalExpectations: EnforcedStyle. This value sets the allowed and preferred method(s) with which to detect and correct errors. Fixes rubocop#142
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Autocorrected test should run without the warning
Actual behavior
Test is failing
Steps to reproduce the problem
I inherited an internal gem, that has some minitests with the pattern, that a lambda is defined that has raising code and should verify the correct raise.
This gives the expected warning while running
Running rubocop gives the warning
Autocorrect creates the following test:
And this fails with
Correcting it to
works and shows no longer the initial warning by minitest.
RuboCop version
The text was updated successfully, but these errors were encountered: