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 32
def initialize(state_machine, state)
  @state_machine = state_machine
  @state = state
end

Public Instance Methods

active?() click to toggle source

@private

# File lib/mocha/state_machine.rb, line 38
def active?
  @state_machine.current_state != @state
end
mocha_inspect() click to toggle source

@private

# File lib/mocha/state_machine.rb, line 43
def mocha_inspect
  "#{@state_machine.name} is not #{@state.mocha_inspect}"
end