1
0
Fork 0

Improve layout flow / tests

This commit is contained in:
Andrew Tomaka 2014-02-15 01:46:22 -05:00
parent 9d2afc431a
commit 1b7268f456
4 changed files with 22 additions and 5 deletions

View File

@ -17,9 +17,7 @@
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><%= link_to 'Create Paste', new_paste_path %></li>
</ul>
</div>
</nav>

View File

@ -1,3 +1,4 @@
<h2>Pastes</h2>
<% @pastes.each do |paste| %>
<%= link_to paste.id, paste %><br />
<%= link_to paste.created_at, paste %><br />
<% end %>

View File

@ -1 +1,3 @@
<%= @paste.content %>
<pre class="prettyprint linenums">
<%= @paste.content %>
</pre>

View File

@ -0,0 +1,16 @@
require 'spec_helper'
feature 'Lists pastes' do
let(:paste) { FactoryGirl.create(:paste) }
before do
visit new_paste_path
fill_in 'Content', with: paste.content
click_button 'Paste it!'
visit pastes_path
end
subject { page }
scenario 'shows paste on index' do
should have_content(paste.created_at)
end
end