Commit 79f7bf8b

mo k <mo@mokhan.ca>
2012-09-25 03:12:16
finish spec for when there is no category.
1 parent f65f771
Changed files (1)
spec/controllers/categories_controller_spec.rb
@@ -26,7 +26,16 @@ describe CategoriesController do
   end
 
   context "when there is NO category that matches the slug" do
-
+    before(:each) do
+      @other_category = FactoryGirl.create(:category, :slug => 'booooo')
+      get :show, :id => @other_category.slug
+    end
+    it "should return zero creations" do
+      assigns(:creations).should be_empty
+    end
+    it "should return the category" do
+      assigns(:category).should eq(@other_category)
+    end
   end
 
   context "when there is a category that matches the slug" do