title: Why did post fail in my Rails functional test?
body: <p>When I run a post in my Rails functional test</p>
  
  <pre><code>setup do
    post :create, :user =&gt; Factory.attributes_for(:user)
  end
  </code></pre>
  
  <p>and it fails, I don't get any feedback as to why.  I know that it fails because my assertion to make sure that there's one additional record in the database fails.</p>
  
  <p>I tried to do</p>
  
  <pre><code>setup do
    post :create, :user =&gt; Factory.attributes_for(:user)
    assert_valid @controller.object
  end
  </code></pre>
  
  <p>but object is a protected method.</p>
  
  <p>How can I examine the errors on the model object that results from the post call?</p>
  
  <p>I'm using Shoulda and Factory Girl, but I suspect that doesn't matter.</p>