class RuboCop::Cop::RSpec::Dialect

Enforces custom RSpec dialects.

A dialect can be based on the following RSpec methods:

By default all of the RSpec methods and aliases are allowed. By setting a config like:

RSpec/Dialect:
  PreferredMethods:
    context: describe

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

You can expect the following behavior:

@example

# bad
context 'display name presence' do
  # ...
end

# good
describe 'display name presence' do
  # ...
end