module RSpec::Mocks
def self.expect_message(subject, message, opts={}, &block)
- Example: Expect the message `foo` to receive `bar`, then call it -
Other tags:
- Yield: - an optional implementation for the expectation
Parameters:
-
opts
() -- a hash of options, :expected_from is used to set the
-
message
() -- a symbol, representing the message that will be
-
subject
() -- the subject on which the message will be expected
def self.expect_message(subject, message, opts={}, &block) space.proxy_for(subject).add_message_expectation(message, opts, &block) end