class RuboCop::Cop::RSpec::MultipleExpectations

def on_block(node)

def on_block(node)
  return unless example?(node)
  return if example_with_aggregated_failures?(node)
  expectations_count = to_enum(:find_expectation, node).count
  return if expectations_count <= max_expectations
  self.max = expectations_count
  flag_example(node, expectation_count: expectations_count)
end