Parent

Class Index [+]

Quicksearch

Mocha::ExpectationList

Public Class Methods

new() click to toggle source
   # File lib/mocha/expectation_list.rb, line 5
5:     def initialize
6:       @expectations = []
7:     end

Public Instance Methods

add(expectation) click to toggle source
    # File lib/mocha/expectation_list.rb, line 9
 9:     def add(expectation)
10:       @expectations.unshift(expectation)
11:       expectation
12:     end
any?() click to toggle source
    # File lib/mocha/expectation_list.rb, line 46
46:     def any?
47:       @expectations.any?
48:     end
length() click to toggle source
    # File lib/mocha/expectation_list.rb, line 42
42:     def length
43:       @expectations.length
44:     end
match(method_name, *arguments) click to toggle source
    # File lib/mocha/expectation_list.rb, line 22
22:     def match(method_name, *arguments)
23:       matching_expectations(method_name, *arguments).first
24:     end
match_allowing_invocation(method_name, *arguments) click to toggle source
    # File lib/mocha/expectation_list.rb, line 26
26:     def match_allowing_invocation(method_name, *arguments)
27:       matching_expectations(method_name, *arguments).detect { |e| e.invocations_allowed? }
28:     end
matches_method?(method_name) click to toggle source
    # File lib/mocha/expectation_list.rb, line 18
18:     def matches_method?(method_name)
19:       @expectations.any? { |expectation| expectation.matches_method?(method_name) }
20:     end
remove_all_matching_method(method_name) click to toggle source
    # File lib/mocha/expectation_list.rb, line 14
14:     def remove_all_matching_method(method_name)
15:       @expectations.reject! { |expectation| expectation.matches_method?(method_name) }
16:     end
to_a() click to toggle source
    # File lib/mocha/expectation_list.rb, line 34
34:     def to_a
35:       @expectations
36:     end
to_set() click to toggle source
    # File lib/mocha/expectation_list.rb, line 38
38:     def to_set
39:       @expectations.to_set
40:     end
verified?(assertion_counter = nil) click to toggle source
    # File lib/mocha/expectation_list.rb, line 30
30:     def verified?(assertion_counter = nil)
31:       @expectations.all? { |expectation| expectation.verified?(assertion_counter) }
32:     end

Private Instance Methods

matching_expectations(method_name, *arguments) click to toggle source
    # File lib/mocha/expectation_list.rb, line 52
52:     def matching_expectations(method_name, *arguments)
53:       @expectations.select { |e| e.match?(method_name, *arguments) }
54:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.