Merge branch 'atomaka/feature/layout-flow' into 'master'

Layout Flow

Random fixes, but mostly setup the layout so it can flow for testing.
This commit is contained in:
Andrew Tomaka 2014-02-27 19:54:07 -05:00
commit 13e75e2aa6
4 changed files with 22 additions and 5 deletions

View file

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

View file

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