class RuboCop::Cop::RSpec::ImplicitExpect

def on_send(node) # rubocop:disable Metrics/MethodLength

rubocop:disable Metrics/MethodLength
def on_send(node) # rubocop:disable Metrics/MethodLength
  return unless (source_range = offending_expect(node))
  expectation_source = source_range.source
  if expectation_source.start_with?(style.to_s)
    correct_style_detected
  else
    opposite_style_detected
    add_offense(
      node,
      location: source_range,
      message: offense_message(expectation_source)
    )
  end
end