diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ef4d7e..8d3423c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 5.0.0 + +- BREAKING: Update rubocop-rspec to 3.0 which enables by default previously pending cops. See [rubocop-rspec's changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md#300-2024-06-11) for details. + # 4.18.0 * Drop support for Ruby 3.0 diff --git a/config/capybara.yml b/config/capybara.yml index b9aeeb7..6dad2df 100644 --- a/config/capybara.yml +++ b/config/capybara.yml @@ -4,9 +4,3 @@ require: rubocop-capybara # scenario. Capybara: Enabled: true - -# We don't want this cop outside of feature or system specs though. -RSpec/Dialect: - Exclude: - - 'spec/features/**/*.rb' - - 'spec/system/**/*.rb' diff --git a/config/rspec.yml b/config/rspec.yml index ad06eb5..ca7db34 100644 --- a/config/rspec.yml +++ b/config/rspec.yml @@ -51,3 +51,20 @@ RSpec/ContextWording: - without - and - but + +# Within GOV.UK we use Capybara test method syntax of feature, +# 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' diff --git a/rubocop-govuk.gemspec b/rubocop-govuk.gemspec index c61cb64..41be388 100644 --- a/rubocop-govuk.gemspec +++ b/rubocop-govuk.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |spec| spec.name = "rubocop-govuk" - spec.version = "4.18.0" + spec.version = "5.0.0" spec.authors = ["Government Digital Service"] spec.email = ["govuk-dev@digital.cabinet-office.gov.uk"]