-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Capybara/FeatureMethods - improve the suggestion? #505
Comments
@andyw8 That would improve the documentation format, but so would I'm not sure the gem should be suggesting the |
Yes, "authenticates with OAuth successfully" would be fine. I think trying to auto-correct from the Capybara DSL to plain RSpec is going to be difficult in many cases. I wonder if it's better not to try, rather than make bad corrections? |
Even making bad corrections/suggestions would be difficult, since we're basically parsing English (or any other natural language) at that point, right? |
Indeed. So maybe the cop should just report the problem rather than try making any fix, e.g. cc @backus for any thoughts. |
See also #538 for another issue with this cop's suggestions. |
I am closing this issue, since the RSpec/Capybara/FeatureMethods cop was removed in #1876 / v3.0.0. |
I've just upgraded to the latest gem so ran into this.
The
Capybara/FeatureMethods
cop suggests thatscenario 'with OAuth'
should be changed toit 'with OAuth'
. I feel this is bad advice. When RSpec is run with--format documentation
, the specs should give a readable, plain-language overview of the behaviour.it with OAuth
is nonsensical.Even though
scenario
is an alias ofit
, I feel that it would better map to a combination ofcontext
andit
. For example:Would become:
Any thoughts on this @rspeicher?
The text was updated successfully, but these errors were encountered: