title: how to stub the :errors collection to act invalid when rspec tests a controller that uses respond_with
body: <p>I refactored my <code>OrgController</code> to use <code>respond_with</code> and now the controller spec scaffold is failing with this message:</p>
  
  <pre><code>1) OrgsController POST create with invalid params re-renders the 'new' template
     Failure/Error: response.should render_template("new")
       expecting &lt;"new"&gt; but rendering with &lt;""&gt;
  </code></pre>
  
  <p>The spec looks like this:</p>
  
  <pre><code>it "re-renders the 'new' template" do
   Org.any_instance.stub(:save).and_return(false)
   post :create, {:org =&gt; {}}, valid_session
   response.should render_template("new")
  end
  </code></pre>
  
  <p>I've read that I should stub the <code>:errors</code> hash to make it look like there is an error.  What's the best way to do that?</p>