title: Rails: How to test state_machine?
body: <p>Please, help me. I'm confused. I know how to write state-driven behavior of model, but I don't know what should I write in specs...</p>
  
  <p>My model.rb file look </p>
  
  <pre><code>class Ratification &lt; ActiveRecord::Base
    belongs_to :user
  
    attr_protected :status_events
  
    state_machine :status, :initial =&gt; :boss do
      state :boss
      state :owner
      state :declarant
      state :done
  
      event :approve do
        transition :boss =&gt; :owner, :owner =&gt; :done
      end
  
      event :divert do
        transition [:boss, :owner] =&gt; :declarant
      end
  
      event :repeat do
        transition :declarant =&gt; :boss
      end
  
    end
  end
  </code></pre>
  
  <p>I use  <a href="http://github.com/pluginaweek/state_machine" rel="noreferrer">state_machine</a> gem.</p>
  
  <p>Please, show me the course.</p>