Commit c50b9d50

mo khan <mo@mokhan.ca>
2013-07-02 06:32:33
fix broken specs
1 parent bffcbe1
Changed files (2)
app/models/tutorial.rb
@@ -1,6 +1,6 @@
 class Tutorial < ActiveRecord::Base
   include PublicActivity::Model
-  tracked owner: Proc.new{ |controller, model| controller.current_user }
+  tracked owner: Proc.new{ |controller, model| controller.current_user if controller }
   attr_accessible :description, :heading, :url, :image_url, :user_id, :author, :author_url
   validates :url,  :presence => true
   belongs_to :user
spec/controllers/creation_tags_controller_spec.rb
@@ -19,7 +19,7 @@ describe CreationTagsController do
     let(:tag) { "cake" }
     let(:tagged_tutorial) { FactoryGirl.create(:tutorial) }
     let(:untagged_tutorial) { FactoryGirl.create(:tutorial) }
-    let(:tagged_cake) { FactoryGirl.create(:creation) }
+    let(:tagged_cake) { FactoryGirl.create(:creation, :photos_count => 1) }
     let(:untagged_cake) { FactoryGirl.create(:creation) }
 
     before :each do