# File lib/mocha/expectation_list.rb, line 9 def add(expectation) @expectations.unshift(expectation) expectation end
# File lib/mocha/expectation_list.rb, line 38 def length @expectations.length end
# File lib/mocha/expectation_list.rb, line 18 def match(method_name, *arguments) matching_expectations(method_name, *arguments).first end
# File lib/mocha/expectation_list.rb, line 22 def match_allowing_invocation(method_name, *arguments) matching_expectations(method_name, *arguments).detect { |e| e.invocations_allowed? } end
# File lib/mocha/expectation_list.rb, line 14 def matches_method?(method_name) @expectations.any? { |expectation| expectation.matches_method?(method_name) } end
# File lib/mocha/expectation_list.rb, line 30 def to_a @expectations end
Generated with the Darkfish Rdoc Generator 2.