class Mocha::UnexpectedInvocation
Exception raised when an unexpected method is invoked
Public Class Methods
new(mock, symbol, *arguments)
click to toggle source
@private
# File lib/mocha/unexpected_invocation.rb, line 7 def initialize(mock, symbol, *arguments) @mock, @symbol, @arguments = mock, symbol, arguments end
Public Instance Methods
full_description()
click to toggle source
@private
# File lib/mocha/unexpected_invocation.rb, line 12 def full_description method_matcher = MethodMatcher.new(@symbol) parameters_matcher = ParametersMatcher.new(@arguments) method_signature = "#{@mock.mocha_inspect}.#{method_matcher.mocha_inspect}#{parameters_matcher.mocha_inspect}" "unexpected invocation: #{method_signature}\n" end
short_description()
click to toggle source
@private
# File lib/mocha/unexpected_invocation.rb, line 20 def short_description "unexpected invocation: #{@symbol}(#{@arguments.join(', ')})" end