Skip to content

Instantly share code, notes, and snippets.

@hmans
Created March 18, 2011 18:35
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 hmans/876593 to your computer and use it in GitHub Desktop.
Save hmans/876593 to your computer and use it in GitHub Desktop.
Having fun with Rspec 2 and Capybara.
require 'acceptance_helper'
feature "Welcome Page" do
background do
50.times { Factory(:user) }
end
scenario "when user is not logged in" do
visit '/'
page.should have_content('Welcome! :)')
within ".peeps" do
page.should have_css('.peep', :count => 25)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment