diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index b97625a..23a61f0 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -17,9 +17,7 @@
diff --git a/app/views/pastes/index.html.erb b/app/views/pastes/index.html.erb index 91d18f3..d45f3b7 100644 --- a/app/views/pastes/index.html.erb +++ b/app/views/pastes/index.html.erb @@ -1,3 +1,4 @@ ++ <%= @paste.content %> +diff --git a/spec/features/lists_pastes_spec.rb b/spec/features/lists_pastes_spec.rb new file mode 100644 index 0000000..55a04ff --- /dev/null +++ b/spec/features/lists_pastes_spec.rb @@ -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