diff --git a/CHANGELOG.md b/CHANGELOG.md index 6645ca1d..8c1e9bb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Fix a false positive for `RSpec/Capybara/SpecificMatcher` when `have_css("a")` without attribute. ([@ydah][]) * Update `RSpec/ExampleWording` cop to raise error for insufficient descriptions. ([@akrox58][]) * Add new `RSpec/Capybara/NegationMatcher` cop. ([@ydah][]) +* Add `AllowedPatterns` configuration option to `RSpec/NoExpectationExample`. ([@ydah][]) ## 2.13.2 (2022-09-23) diff --git a/config/default.yml b/config/default.yml index f0e0c8d0..b232db2e 100644 --- a/config/default.yml +++ b/config/default.yml @@ -643,7 +643,11 @@ RSpec/NoExpectationExample: Enabled: pending Safe: false VersionAdded: '2.13' + VersionChanged: '2.14' Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NoExpectationExample + AllowedPatterns: + - "^expect_" + - "^assert_" RSpec/NotToNot: Description: Checks for consistent method usage for negating expectations.