diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d3423c..2cb2ddd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 5.0.1 + +- Disable RSpec/NoExpectationExample for feature and system specs as it false triggers. + # 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. diff --git a/config/rspec.yml b/config/rspec.yml index ca7db34..a247652 100644 --- a/config/rspec.yml +++ b/config/rspec.yml @@ -31,6 +31,13 @@ RSpec/InstanceVariable: - 'spec/features/**/*.rb' - 'spec/system/**/*.rb' +# The GOV.UK Feature spec style has expectations in method calls so this +# cop falsely triggers. +RSpec/NoExpectationExample: + Exclude: + - 'spec/features/**/*.rb' + - 'spec/system/**/*.rb' + # In GOV.UK we quite often test that a class received a method. RSpec/MessageSpies: Enabled: false @@ -56,7 +63,7 @@ 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 + # Disables all Capybara-specific methods that have the same native # RSpec method (e.g. are just aliases) PreferredMethods: background: :before diff --git a/rubocop-govuk.gemspec b/rubocop-govuk.gemspec index 41be388..9277d74 100644 --- a/rubocop-govuk.gemspec +++ b/rubocop-govuk.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |spec| spec.name = "rubocop-govuk" - spec.version = "5.0.0" + spec.version = "5.0.1" spec.authors = ["Government Digital Service"] spec.email = ["govuk-dev@digital.cabinet-office.gov.uk"]