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.



7
8
9
# File 'lib/mocha/sequence.rb', line 7

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

Instance Method Details

#allows_invocation_now?Boolean

Returns:

  • (Boolean)


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

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

#mocha_inspectObject



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

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