Class: Mocha::InStateOrderingConstraint
- Defined in:
- lib/mocha/in_state_ordering_constraint.rb
Instance Method Summary collapse
- #allows_invocation_now? ⇒ Boolean
-
#initialize(state_predicate) ⇒ InStateOrderingConstraint
constructor
A new instance of InStateOrderingConstraint.
- #mocha_inspect ⇒ Object
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
9 10 11 |
# File 'lib/mocha/in_state_ordering_constraint.rb', line 9 def allows_invocation_now? @state_predicate.active? end |
#mocha_inspect ⇒ Object
13 14 15 |
# File 'lib/mocha/in_state_ordering_constraint.rb', line 13 def mocha_inspect "when #{@state_predicate.mocha_inspect}" end |