Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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