module RSpec::Mocks
def self.allow_message(subject, message, opts={}, &block)
- Example: Defines the implementation of `foo` on `bar`, using the passed block -
Other tags:
- Yield: - an optional implementation for the allowance
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 to which the message will be added
def self.allow_message(subject, message, opts={}, &block) space.proxy_for(subject).add_stub(message, opts, &block) end