Commit c6ae7e3a
Changed files (2)
app
views
tutorials
spec
views
tutorials
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/)