diff --git a/.rubocop.yml b/.rubocop.yml index 215801c..e355e07 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,7 +4,5 @@ inherit_gem: Naming/FileName: Exclude: - lib/rubocop-petal.rb -Rails/Output: - Enabled: false -Rails/RakeEnvironment: +Rails: Enabled: false diff --git a/CHANGELOG.md b/CHANGELOG.md index c1a0bab..71648df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ # main +* Remove usage of `delegate` from activesupport. ([#78](https://github.com/petalmd/rubocop-petal/pull/78)) + # v1.3.0 (2024-01-09) * Added autocorrection for `RSpec/MultipleExpectations`. diff --git a/lib/rubocop/cop/rspec/aggregate_examples/language.rb b/lib/rubocop/cop/rspec/aggregate_examples/language.rb index cf56cf7..f41d4d8 100644 --- a/lib/rubocop/cop/rspec/aggregate_examples/language.rb +++ b/lib/rubocop/cop/rspec/aggregate_examples/language.rb @@ -24,7 +24,9 @@ def +(other) self.class.new(selectors + other.selectors) end - delegate :include?, to: :selectors + def include?(selector) + selectors.include?(selector) + end def block_pattern "(block #{send_pattern} ...)"