<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -181,7 +181,7 @@ module ThoughtBot # :nodoc:
                 res.klass.send(:alias_method, :save, :original_save)                
               end
 
-              should_render_template :new
+              should_render_template :new unless res.denied.actions.include?(:create)
             end
           end
 
@@ -226,7 +226,7 @@ module ThoughtBot # :nodoc:
                 res.klass.send(:alias_method, :update_attributes, :original_update_attributes)                
               end
 
-              should_render_template :edit
+              should_render_template :edit unless res.denied.actions.include?(:update)
             end
           end
         end</diff>
      <filename>lib/shoulda/controller_tests/formats/html.rb</filename>
    </modified>
    <modified>
      <diff>@@ -139,8 +139,10 @@ module ThoughtBot # :nodoc:
                 res.klass.send(:alias_method, :save, :original_save)                
               end
               
-              should_respond_with_xml_for :errors
-              should_respond_with(:unprocessable_entity)
+              unless res.denied.actions.include?(:create)
+                should_respond_with_xml_for :errors
+                should_respond_with(:unprocessable_entity)
+              end
             end
           end
 
@@ -180,8 +182,10 @@ module ThoughtBot # :nodoc:
                 res.klass.send(:alias_method, :update_attributes, :original_update_attributes)                
               end
               
-              should_respond_with_xml_for :errors
-              should_respond_with(:unprocessable_entity)
+              unless res.denied.actions.include?(:update)
+                should_respond_with_xml_for :errors
+                should_respond_with(:unprocessable_entity)
+              end
             end
 
           end</diff>
      <filename>lib/shoulda/controller_tests/formats/xml.rb</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,7 @@ class PostsController &lt; ApplicationController
         format.xml  { head :created, :location =&gt; user_post_url(@post.user, @post) }
       else
         format.html { render :action =&gt; &quot;new&quot; }
-        format.xml  { render :xml =&gt; @post.errors.to_xml }
+        format.xml  { render :xml =&gt; @post.errors.to_xml, :status =&gt; :unprocessable_entity }
       end
     end
   end
@@ -53,7 +53,7 @@ class PostsController &lt; ApplicationController
         format.xml  { head :ok }
       else
         format.html { render :action =&gt; &quot;edit&quot; }
-        format.xml  { render :xml =&gt; @post.errors.to_xml }
+        format.xml  { render :xml =&gt; @post.errors.to_xml, :status =&gt; :unprocessable_entity }
       end
     end
   end</diff>
      <filename>test/rails_root/app/controllers/posts_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,7 +43,7 @@ class UsersController &lt; ApplicationController
         format.xml  { head :created, :location =&gt; user_url(@user) }
       else
         format.html { render :action =&gt; &quot;new&quot; }
-        format.xml  { render :xml =&gt; @user.errors.to_xml }
+        format.xml  { render :xml =&gt; @user.errors.to_xml, :status =&gt; :unprocessable_entity }
       end
     end
   end
@@ -60,7 +60,7 @@ class UsersController &lt; ApplicationController
         format.xml  { head :ok }
       else
         format.html { render :action =&gt; &quot;edit&quot; }
-        format.xml  { render :xml =&gt; @user.errors.to_xml }
+        format.xml  { render :xml =&gt; @user.errors.to_xml, :status =&gt; :unprocessable_entity }
       end
     end
   end</diff>
      <filename>test/rails_root/app/controllers/users_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>08eb2c743dd4e58112d04d3912e3c4cc8fb441c9</id>
    </parent>
  </parents>
  <author>
    <name>Jonathan Lim</name>
    <email>snowblink@gmail.com</email>
  </author>
  <url>http://github.com/snowblink/shoulda/commit/f95e9bfd23dd0fdadcaf395d7f2ddc9282866129</url>
  <id>f95e9bfd23dd0fdadcaf395d7f2ddc9282866129</id>
  <committed-date>2008-06-16T11:44:20-07:00</committed-date>
  <authored-date>2008-06-16T11:44:20-07:00</authored-date>
  <message>Adding tests for new should_be_restful tests [#20]</message>
  <tree>c47f610d2a29604ecb3018430f034ea76cf2e648</tree>
  <committer>
    <name>Jonathan Lim</name>
    <email>snowblink@gmail.com</email>
  </committer>
</commit>
