Class Mocha::StateMachine
In: lib/mocha/state_machine.rb
Parent: Object

A state machine that is used to constrain the order of invocations. An invocation can be constrained to occur when a state {is}, or {is_not}, active.

Methods

become   is   is_not   mocha_inspect   new   starts_as  

Classes and Modules

Class Mocha::StateMachine::State
Class Mocha::StateMachine::StatePredicate

Attributes

current_state  [RW]  @private
name  [R]  @private

Public Class methods

@private

Public Instance methods

Put the {StateMachine} into the next_state_name.

@param [String] next_state_name name of new state

Provides a mechanism to change the {StateMachine} into the state specified by state_name at some point in the future.

Or provides a mechanism to determine whether the {StateMachine} is in the state specified by state_name at some point in the future.

@param [String] state_name name of new state @return [State] state which, when activated, will change the {StateMachine} into the state with the specified state_name.

Provides a mechanism to determine whether the {StateMachine} is not in the state specified by state_name at some point in the future. rubocop:disable Naming/PredicateName

Put the {StateMachine} into the state specified by initial_state_name.

@param [String] initial_state_name name of initial state @return [StateMachine] state machine, thereby allowing invocations of other {StateMachine} methods to be chained.

[Validate]