class RuboCop::Cop::RSpec::StubbedMock

def on_expectation(expectation, method_name, matcher)

def on_expectation(expectation, method_name, matcher)
  flag_expectation = lambda do
    add_offense(expectation, message: msg(method_name))
  end
  matcher_with_configured_response(matcher, &flag_expectation)
  matcher_with_return_block(matcher, &flag_expectation)
  matcher_with_hash(matcher, &flag_expectation)
  matcher_with_blockpass(matcher, &flag_expectation)
end