Skip to content

Instantly share code, notes, and snippets.

@madelinecr
Created June 7, 2012 08:02
Show Gist options
  • Save madelinecr/2887316 to your computer and use it in GitHub Desktop.
Save madelinecr/2887316 to your computer and use it in GitHub Desktop.
specfile
require 'spec_helper'
describe "Static pages" do
describe "Home page" do
before { visit '/static_pages/home' }
specify { page.should have_selector('h1', :text => 'Sample App')
specify { page.should have_selector('title', :text => "Ruby on Rails Tutorial Sample App | Home")
end
describe "Help page" do
before { visit '/static_pages/help' }
specify { page.should have_selector('h1', :text => 'Help')
specify { page.should have_selector('title', :text => "Ruby on Rails Tutorial Sample App | Help")
end
describe "About page" do
before { visit '/static_pages/home' }
specify { page.should have_selector('h1', :text => 'About Us')
specify { page.should have_selector('title', :text => "Ruby on Rails Tutorial Sample App | About Us")
end
describe "Contact Us" do
before { visit '/static_pages/home' }
specify { page.should have_selector('h1', :text => 'Contact Us')
specify { page.should have_selector('title', :text => "Ruby on Rails Tutorial Sample App | Contact Us")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment