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

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>then()</tt> is used as syntactic sugar to improve readability. It has no effect on state of the expectation.
- !ruby/struct:SM::Flow::VERB 
  body: "  object = mock()\n  object.stubs(:expected_method).returns(1, 2).then.raises(Exception).then.returns(4)\n  object.expected_method # =&gt; 1\n  object.expected_method # =&gt; 2\n  object.expected_method # =&gt; raises exception of class Exception\n  object.expected_method # =&gt; 4\n"
- !ruby/struct:SM::Flow::P 
  body: <tt>then(state_machine.is(state))</tt> is used to change the <tt>state_machine</tt> to the specified <tt>state</tt> when the invocation occurs.
- !ruby/struct:SM::Flow::P 
  body: See also API#states, StateMachine and Expectation#when.
- !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::Expectation#then
is_singleton: false
name: then
params: " then() -> expectation\n\
  then(state_machine.is(state)) -> expectation\n"
visibility: public
