Skip to content

Commit

Permalink
Code review. Optimize the cop further with filtering block and begin …
Browse files Browse the repository at this point in the history
…child nodes
  • Loading branch information
andrykonchin committed Jul 2, 2020
1 parent 128e0a0 commit 2af9a29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/nested_groups.rb
Expand Up @@ -115,7 +115,7 @@ def find_nested_example_groups(node, nesting: 1, &block)

next_nesting = example_group ? nesting + 1 : nesting

node.each_child_node do |child|
node.each_child_node(:block, :begin) do |child|
find_nested_example_groups(child, nesting: next_nesting, &block)
end
end
Expand Down

0 comments on commit 2af9a29

Please sign in to comment.