Commit 22c6a9d7

mo k <mo@mokhan.ca>
2012-09-25 04:08:37
fix the destroy specs.
1 parent 16bebb1
Changed files (1)
spec/controllers/creations_controller_spec.rb
@@ -105,15 +105,13 @@ describe CreationsController do
   end
 
   describe "DELETE destroy" do
+    before :each do
+      delete :destroy, :id => creation.id
+    end
     it "destroys the requested creation" do
-      user.stub(:creations){ mock_creation }
-      mock_creation.should_receive(:destroy)
-      delete :destroy, :id => "37"
+      user.creations.count.should == 0
     end
-
     it "redirects to the creations list" do
-      user.stub(:creations){ mock_creation }
-      delete :destroy, :id => "1"
       response.should redirect_to(creations_url)
     end
   end