We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e85969d + 0816629 commit 0f0fb8bCopy full SHA for 0f0fb8b
lib/rubocop/cop/rspec/empty_example_group.rb
@@ -137,7 +137,7 @@ class EmptyExampleGroup < Base
137
PATTERN
138
139
def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
140
- return if node.each_ancestor(:def, :defs).any?
+ return if node.each_ancestor(:any_def).any?
141
return if node.each_ancestor(:block).any? { |block| example?(block) }
142
143
example_group_body(node) do |body|
lib/rubocop/cop/rspec/focus.rb
@@ -73,7 +73,7 @@ class Focus < Base
73
74
75
def on_send(node)
76
- return if node.chained? || node.each_ancestor(:def, :defs).any?
+ return if node.chained? || node.each_ancestor(:any_def).any?
77
78
if focused_block?(node)
79
on_focused_block(node)
0 commit comments