class RSpec::Mocks::SimpleMessageExpectation
@private
optimization.
MessageExpectation, 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 unadvise(_)
def unadvise(_) end
def verify_messages_received
def verify_messages_received return if @received @error_generator.raise_expectation_error( @message, 1, ArgumentListMatcher::MATCH_ALL, 0, nil, [], @backtrace_line ) end