Class: Mocha::InStateOrderingConstraint

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

Instance Method Summary collapse

Constructor Details

#initialize(state_predicate) ⇒ InStateOrderingConstraint

Returns a new instance of InStateOrderingConstraint.



5
6
7
# File 'lib/mocha/in_state_ordering_constraint.rb', line 5

def initialize(state_predicate)
  @state_predicate = state_predicate
end

Instance Method Details

#allows_invocation_now?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/mocha/in_state_ordering_constraint.rb', line 9

def allows_invocation_now?
  @state_predicate.active?
end

#mocha_inspectObject



13
14
15
# File 'lib/mocha/in_state_ordering_constraint.rb', line 13

def mocha_inspect
  "when #{@state_predicate.mocha_inspect}"
end