method
invoke_return_block
1.1.4 -
Show latest stable
- Class:
Spec::Mocks::BaseExpectation
invoke_return_block(args, block)protected
No documentation available.
# File lib/spec/mocks/message_expectation.rb, line 139
def invoke_return_block(args, block)
args << block unless block.nil?
# Ruby 1.9 - when we set @return_block to return values
# regardless of arguments, any arguments will result in
# a "wrong number of arguments" error
if @ignore_args
@return_block.call()
else
@return_block.call(*args)
end
end