Skip to content

Commit 0816629

Browse files
committed
Fix a InternalAffairs/NodeTypeGroup
1 parent e85969d commit 0816629

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/rubocop/cop/rspec/empty_example_group.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class EmptyExampleGroup < Base
137137
PATTERN
138138

139139
def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
140-
return if node.each_ancestor(:def, :defs).any?
140+
return if node.each_ancestor(:any_def).any?
141141
return if node.each_ancestor(:block).any? { |block| example?(block) }
142142

143143
example_group_body(node) do |body|

lib/rubocop/cop/rspec/focus.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Focus < Base
7373
PATTERN
7474

7575
def on_send(node)
76-
return if node.chained? || node.each_ancestor(:def, :defs).any?
76+
return if node.chained? || node.each_ancestor(:any_def).any?
7777

7878
if focused_block?(node)
7979
on_focused_block(node)

0 commit comments

Comments
 (0)