Commit 21a9448b

mo k <mo@mokhan.ca>
2012-10-02 13:27:42
fix broken view spec.
1 parent 34cc56c
Changed files (2)
spec
factories
views
spec/factories/tutorial.rb
@@ -0,0 +1,10 @@
+FactoryGirl.define do
+  factory :tutorial do
+    heading "blah"
+    description "well hello there"
+    url "http://mokhan.ca/"
+    image_url "http://example.com"
+    author "mo"
+    author_url "mokhan.ca"
+  end
+end
spec/views/tutorials/edit.html.erb_spec.rb
@@ -2,11 +2,7 @@ require 'spec_helper'
 
 describe "tutorials/edit" do
   before(:each) do
-    @tutorial = assign(:tutorial, stub_model(Tutorial,
-      :heading => "MyString",
-      :description => "MyText",
-      :url => "MyString"
-    ))
+    @tutorial = assign(:tutorial, FactoryGirl.build(:tutorial))
   end
 
   it "renders the edit tutorial form" do