Skip to content

Commit

Permalink
Update RSpec/Dialect config
Browse files Browse the repository at this point in the history
so that all Capybara-specific methods that have the same native RSpec method
(e.g. are just aliases) following the upgrade to rubocop-rspec 3.0.

See:
- https://github.com/rubocop/rubocop-rspec/pull/1848/files
- rubocop/rubocop-rspec@1fa9ce3

> If you were previously using the ‘RSpec/Capybara/FeatureMethods` cop and want to keep disabling all Capybara-specific methods that have the same native RSpec method (e.g. are just aliases), use the following config:
>
> ```
> RSpec/Dialect:
>    PreferredMethods:
>      background: :before
>      scenario:   :it
>      xscenario:  :xit
>      given:      :let
>      given!:     :let!
>      feature:    :describe
> ```
  • Loading branch information
AgaDufrat committed Jun 18, 2024
1 parent 993ffa7 commit f176db6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ RSpec/ContextWording:
# scenario.
# We don't want this cop outside of feature or system specs though.
RSpec/Dialect:
# Disables all Capybara-specific methods that have the same native
# RSpec method (e.g. are just aliases)
PreferredMethods:
background: :before
scenario: :it
xscenario: :xit
given: :let
given!: :let!
feature: :describe
Exclude:
- 'spec/features/**/*.rb'
- 'spec/system/**/*.rb'

0 comments on commit f176db6

Please sign in to comment.