class Mocha::StateMachine::StatePredicate
Provides the ability to determine whether a {StateMachine} is in a specified state at some point in the future.
Public Class Methods
new(state_machine, state)
click to toggle source
@private
# File lib/mocha/state_machine.rb, line 36 def initialize(state_machine, state) @state_machine, @state = state_machine, state end
Public Instance Methods
active?()
click to toggle source
@private
# File lib/mocha/state_machine.rb, line 41 def active? @state_machine.current_state != @state end
mocha_inspect()
click to toggle source
@private
# File lib/mocha/state_machine.rb, line 46 def mocha_inspect "#{@state_machine.name} is not #{@state.mocha_inspect}" end