Skip to content

Instantly share code, notes, and snippets.

@jeffchan
Created July 2, 2013 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffchan/5909925 to your computer and use it in GitHub Desktop.
Save jeffchan/5909925 to your computer and use it in GitHub Desktop.
Explore page rspec
require 'spec_helper'
describe 'Explore page' do
let(:book) { factory_stubbed_book('Metamorphosis', 'Franz Kafka') }
before do
PopularBooks.stub(:random => [book])
end
describe 'book listing' do
it 'shows the basic information' do
visit(explore_index_path)
within('#main-content') do
page.should have_content('Metamorphosis')
page.should have_content('Franz Kafka')
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment