Parent

Class/Module Index [+]

Quicksearch

Mocha::Sequence

Public Class Methods

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

Public Instance Methods

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.