Method: RuboCop::Cop::RSpec::NestedGroups#on_top_level_group

Defined in:
lib/rubocop/cop/rspec/nested_groups.rb

#on_top_level_group(node) ⇒ Object


107
108
109
110
111
112
113
114
115
# File 'lib/rubocop/cop/rspec/nested_groups.rb', line 107

def on_top_level_group(node)
  find_nested_example_groups(node) do |example_group, nesting|
    self.max = nesting
    add_offense(
      example_group.send_node,
      message: message(nesting)
    )
  end
end