Skip to content
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: configure preferred replacement method #147

Closed
gi opened this issue Oct 18, 2021 · 0 comments · Fixed by #148
Closed

Minitest/GlobalExpectations: configure preferred replacement method #147

gi opened this issue Oct 18, 2021 · 0 comments · Fixed by #148

Comments

@gi
Copy link
Contributor

gi commented Oct 18, 2021

Is your feature request related to a problem? Please describe.

The default/preferred method for global expectations (used for autocorrecting errors) is _. I would like to use expect:

  • _ is not very clear what it's meaning or function is
  • value is better but very generic and might clash with actual values

Describe the solution you'd like

I would like to specify the preferred/replacement method when autocorrecting errors.

Describe alternatives you've considered

I could duplicate the source code and write my own custom cop, simply replacing the _ with the preferred method.

Additional context

No.

gi added a commit to gi/rubocop-minitest that referenced this issue Oct 18, 2021
…nfig value

Add a new configuration value for Minitest/GlobalExpectations: PreferredMethod.
This value sets the preferred method with which to correct errors.

Note: This does not alter the set of correct methods, only the replacement for
offenses.

Fixes rubocop#147
gi added a commit to gi/rubocop-minitest that referenced this issue Oct 18, 2021
…nfig value

Add a new configuration value for Minitest/GlobalExpectations: PreferredMethod.
This value sets the preferred method with which to correct errors.

Note: This does not alter the set of correct methods, only the replacement for
offenses.

Fixes rubocop#147
gi added a commit to gi/rubocop-minitest that referenced this issue Oct 18, 2021
…nfig value

Add a new configuration value for Minitest/GlobalExpectations: PreferredMethod.
This value sets the preferred method with which to correct errors.

Note: This does not alter the set of correct methods, only the replacement for
offenses.

Fixes rubocop#147
gi added a commit to gi/rubocop-minitest that referenced this issue Oct 19, 2021
…nfig value

Add a new configuration value for Minitest/GlobalExpectations: PreferredMethod.
This value sets the preferred method with which to correct errors.

Note: This does not alter the set of correct methods, only the replacement for
offenses.

Fixes rubocop#147
gi added a commit to gi/rubocop-minitest that referenced this issue Oct 20, 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#147
gi added a commit to gi/rubocop-minitest that referenced this issue Oct 22, 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#147
gi added a commit to gi/rubocop-minitest that referenced this issue Oct 22, 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#147
gi added a commit to gi/rubocop-minitest that referenced this issue Nov 1, 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#147
gi added a commit to gi/rubocop-minitest that referenced this issue Nov 1, 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#147
@koic koic closed this as completed in #148 Nov 2, 2021
koic added a commit that referenced this issue Nov 2, 2021
…ed-method

[Fix #147] Minitest/GlobalExpectations: add EnforcedStyle config value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant