Parent

Files

Mocha::Sequence

Public Class Methods

new(name) click to toggle source
    # File lib/mocha/sequence.rb, line 21
21:     def initialize(name)
22:       @name = name
23:       @expectations = []
24:     end

Public Instance Methods

constrain_as_next_in_sequence(expectation) click to toggle source
    # File lib/mocha/sequence.rb, line 26
26:     def constrain_as_next_in_sequence(expectation)
27:       index = @expectations.length
28:       @expectations << expectation
29:       expectation.add_ordering_constraint(InSequenceOrderingConstraint.new(self, index))
30:     end
mocha_inspect() click to toggle source
    # File lib/mocha/sequence.rb, line 36
36:     def mocha_inspect
37:       "#{@name.mocha_inspect}"
38:     end
satisfied_to_index?(index) click to toggle source
    # File lib/mocha/sequence.rb, line 32
32:     def satisfied_to_index?(index)
33:       @expectations[0...index].all? { |expectation| expectation.satisfied? }
34:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.