class RSpec::Mocks::Proxy

def add_message_expectation(method_name, opts=DEFAULT_MESSAGE_EXPECTATION_OPTS, &block)

Other tags:
    Private: -
def add_message_expectation(method_name, opts=DEFAULT_MESSAGE_EXPECTATION_OPTS, &block)
  location = opts.fetch(:expected_from) { CallerFilter.first_non_rspec_line }
  meth_double = method_double_for(method_name)
  if null_object? && !block
    meth_double.add_default_stub(@error_generator, @order_group, location, opts) do
      @object
    end
  end
  meth_double.add_expectation @error_generator, @order_group, location, opts, &block
end