--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new <tt>state_machine</tt> that is used to constrain the order in which expectations can occur.
- !ruby/struct:SM::Flow::P 
  body: Specify the initial <tt>state</tt> of the <tt>state_machine</tt> by using StateMachine#starts_as.
- !ruby/struct:SM::Flow::P 
  body: Specify that an expected invocation should change the <tt>state</tt> of the <tt>state_machine</tt> by using Expectation#then.
- !ruby/struct:SM::Flow::P 
  body: Specify that an expected invocation should be constrained to occur within a particular <tt>state</tt> by using Expectation#when.
- !ruby/struct:SM::Flow::P 
  body: A test can contain multiple <tt>state_machines</tt>.
- !ruby/struct:SM::Flow::P 
  body: See also Expectation#then, Expectation#when and StateMachine.
- !ruby/struct:SM::Flow::VERB 
  body: "  power = states('power').starts_as('off')\n\n  radio = mock('radio')\n  radio.expects(:switch_on).then(power.is('on'))\n  radio.expects(:select_channel).with('BBC Radio 4').when(power.is('on'))\n  radio.expects(:adjust_volume).with(+5).when(power.is('on'))\n  radio.expects(:select_channel).with('BBC World Service').when(power.is('on'))\n  radio.expects(:adjust_volume).with(-5).when(power.is('on'))\n  radio.expects(:switch_off).then(power.is('off'))\n"
full_name: Mocha::API#states
is_singleton: false
name: states
params: " states(name) -> state_machine\n"
visibility: public
