Skip to content

Commit a3eccd0

Browse files
committed
Merge branch 'master' into test_and_deprecate_top_level_group_mixin_method
2 parents b7d0877 + 2a803ff commit a3eccd0

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
## Master (Unreleased)
44

5+
- Deprecate `top_level_group?` method from `TopLevelGroup` mixin as all of its callers were intentionally removed from `Rubocop/RSpec`. ([@corsonknowles])
6+
7+
## 3.2.0 (2024-10-26)
8+
59
- Fix `RSpec/VoidExpect` to only operate inside an example block. ([@corsonknowles])
610
- Change `RSpec/ContextWording` cop to always report an offense when both `Prefixes` and `AllowedPatterns` are empty. ([@ydah])
7-
- Fix an error for `RSpec/ChangeByZero` when `change (...) .by (0)` and `change (...)`, concatenated with `and` and `or`. ([@ydah])
8-
- Deprecate `top_level_group?` method from `TopLevelGroup` mixin as all of its callers were intentionally removed from `Rubocop/RSpec`. ([@corsonknowles])
11+
- Add support for `and` and `or` compound matchers to `RSpec/ChangeByZero` cop. ([@ydah])
912

1013
## 3.1.0 (2024-10-01)
1114

lib/rubocop/cop/rspec/change_by_zero.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,8 @@ def register_offense(node, change_node)
118118
# rubocop:enable Metrics/MethodLength
119119

120120
def compound_expectations?(node)
121-
if node.parent.send_type?
121+
node.parent.send_type? &&
122122
%i[and or & |].include?(node.parent.method_name)
123-
else
124-
node.parent.and_type? || node.parent.or_type?
125-
end
126123
end
127124

128125
def message(change_node)

lib/rubocop/cop/rspec/mixin/top_level_group.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module TopLevelGroup
1010
DEPRECATED_MODULE_METHOD_WARNING =
1111
'top_level_group? is deprecated and will be ' \
1212
'removed in the next major version of rubocop_rspec.'
13+
1314
def on_new_investigation
1415
super
1516

lib/rubocop/rspec/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module RuboCop
44
module RSpec
55
# Version information for the RSpec RuboCop plugin.
66
module Version
7-
STRING = '3.1.0'
7+
STRING = '3.2.0'
88
end
99
end
1010
end

0 commit comments

Comments
 (0)