Class: Mocha::Sequence::InSequenceOrderingConstraint

Inherits:
Object
  • Object
show all
Defined in:
lib/mocha/sequence.rb

Instance Method Summary collapse

Constructor Details

#initialize(sequence, index) ⇒ InSequenceOrderingConstraint

Returns a new instance of InSequenceOrderingConstraint


12
13
14
# File 'lib/mocha/sequence.rb', line 12

def initialize(sequence, index)
  @sequence, @index = sequence, index
end

Instance Method Details

#allows_invocation_now?Boolean

Returns:

  • (Boolean)

16
17
18
# File 'lib/mocha/sequence.rb', line 16

def allows_invocation_now?
  @sequence.satisfied_to_index?(@index)
end

#mocha_inspectObject


20
21
22
# File 'lib/mocha/sequence.rb', line 20

def mocha_inspect
  "in sequence #{@sequence.mocha_inspect}"
end