Created
July 2, 2013 14:49
-
-
Save jeffchan/5909925 to your computer and use it in GitHub Desktop.
Explore page rspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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