Commit de17207e

mo k <mo@mokhan.ca>
2012-09-13 13:02:47
add created_at to stub model.
1 parent 6d1fd8f
Changed files (1)
spec
views
spec/views/tutorials/index.html.erb_spec.rb
@@ -6,20 +6,21 @@ describe "tutorials/index" do
       stub_model(Tutorial,
         :heading => "Heading",
         :description => "MyText",
-        :url => "Url"
+        :url => "Url",
+        :created_at => DateTime.new(2012, 9, 13)
       ),
       stub_model(Tutorial,
         :heading => "Heading",
         :description => "MyText",
-        :url => "Url"
+        :url => "Url",
+        :created_at => DateTime.new(2012, 9, 13)
       )
     ])
   end
 
   it "renders a list of tutorials" do
     render
-    # Run the generator again with the --webrat flag if you want to use webrat matchers
-    assert_select "h3", :text => "Heading".to_s, :count => 2
+    assert_select "h3", :text => "Heading September. 13, 2012", :count => 2
     assert_select "p", :text => "MyText".to_s, :count => 2
   end
 end