Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 69c7d82016
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (18 sloc) 0.568 kb
require 'mocha/expectation'
module Mocha # :nodoc:
# Extends Mocha::Expectation to record the full arguments and count whenver a
# stubbed or mocked method is invoked.
class Expectation # :nodoc:
attr_accessor :invocation_count
def invoke_with_args(args, &block)
Mockery.instance.invocation(@mock, method_name, args)
invoke_without_args(&block)
end
alias_method :invoke_without_args, :invoke
alias_method :invoke, :invoke_with_args
private
def method_name
@method_matcher.expected_method_name
end
end
end
Jump to Line
Something went wrong with that request. Please try again.