You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some rspec hooks which we use for debugging and don't want committed. It would be useful to have a cop which checks for those options (conditions? filters? I'm not sure on the naming). This is similar to the RSpec/Focus cop but more general and allows for a list of options.
For our use case we would only need to disallow option names without checking values (e.g. :headless, headless: true, and headless: false would all be violations).
Describe the solution you'd like
RSpec.configuredo |config|
# Allow a test to be run in the foreground for debuggingconfig.before(:each,type: :system,headless: false)dodriven_by:selenium_chromeendendRSpec.describe"foo"do# bad: headless not allowedit"does a thing",headless: falsedoendend
The text was updated successfully, but these errors were encountered:
In the case of headless it may or it may not but either way it is something we don't want to commit and would ideally be caught in linting.
Another example that wouldn't fail on CI but we still don't want to commit would be :debug which enables debug logging for a specific spec we're investigating.
We have some rspec hooks which we use for debugging and don't want committed. It would be useful to have a cop which checks for those options (conditions? filters? I'm not sure on the naming). This is similar to the
RSpec/Focus
cop but more general and allows for a list of options.For our use case we would only need to disallow option names without checking values (e.g.
:headless
,headless: true
, andheadless: false
would all be violations).Describe the solution you'd like
The text was updated successfully, but these errors were encountered: