class RSpec::Mocks::SimpleMessageExpectation

@private
optimization.
MessageExpecation, this version is much faster and so can be used as an
for a message. While this same effect can be achieved using a standard
A message expectation that only allows concrete return values to be set

def called_max_times?

def called_max_times?
  false
end

def initialize(message, response, error_generator, backtrace_line = nil)

def initialize(message, response, error_generator, backtrace_line = nil)
  @message, @response, @error_generator, @backtrace_line = message.to_sym, response, error_generator, backtrace_line
  @received = false
end

def invoke(*_)

def invoke(*_)
  @received = true
  @response
end

def matches?(message, *_)

def matches?(message, *_)
  @message == message.to_sym
end

def verify_messages_received

def verify_messages_received
  InsertOntoBacktrace.line(@backtrace_line) do
    unless @received
      @error_generator.raise_expectation_error(@message, 1, ArgumentListMatcher::MATCH_ALL, 0, nil)
    end
  end
end