Commit f65f7719

mo k <mo@mokhan.ca>
2012-09-25 03:06:40
update the category controller specs.
1 parent 2e1cb4e
Changed files (3)
spec
spec/controllers/categories_controller_spec.rb
@@ -3,8 +3,11 @@ require 'spec_helper'
 describe CategoriesController do
 
   before(:each) do
-    @creations = []
+    @creation = FactoryGirl.create(:creation)
+    @creations = [@creation]
     @category = FactoryGirl.create(:category, :creations => @creations)
+    @creation.category_ids = [@category.id]
+    @creation.save
   end
 
   describe "GET show" do
spec/factories/creation.rb
@@ -2,5 +2,6 @@ FactoryGirl.define do
   factory :creation, class: Creation do
     name 'cake'
     story 'whats the story morning glory?'
+    image { File.new(File.join( Rails.root, 'spec/fixtures/images/example.png')) }
   end
 end
spec/fixtures/images/example.png
Binary file