Commit c6ae7e3a

mo k <mo@mokhan.ca>
2012-09-13 03:42:07
fix broken spec.
1 parent 893fd37
Changed files (2)
app
views
tutorials
spec
views
app/views/tutorials/show.html.erb
@@ -1,9 +1,7 @@
 <div class="row">
   <div class="span12">
     <h1><%= @tutorial.heading %> <small><a href="<%= @tutorial.url %>">read it</a></small></h1>
-    <% if current_user == @tutorial.user -%>
     <%= link_to "destroy", @tutorial, :method => :delete, :confirm => "Are you sure?" %>
-    <% end -%>
     <p><%= @tutorial.description %> </p>
   </div>
 </div>
spec/views/tutorials/show.html.erb_spec.rb
@@ -5,13 +5,13 @@ describe "tutorials/show" do
     @tutorial = assign(:tutorial, stub_model(Tutorial,
       :heading => "Heading",
       :description => "MyText",
-      :url => "Url"
+      :url => "Url",
+      :image_url => "http://placehold.it/300x200"
     ))
   end
 
   it "renders attributes in <p>" do
     render
-    # Run the generator again with the --webrat flag if you want to use webrat matchers
     rendered.should match(/Heading/)
     rendered.should match(/MyText/)
     rendered.should match(/Url/)