Skip to content

Instantly share code, notes, and snippets.

@ciwolsey
Created February 21, 2014 02:55
Show Gist options
  • Save ciwolsey/9127949 to your computer and use it in GitHub Desktop.
Save ciwolsey/9127949 to your computer and use it in GitHub Desktop.
Test
require 'spec_helper'
describe "Static pages" do
describe "Home page" do
it "should have the content 'Sample App'" do
visit '/static_pages/home'
expect(page).to have_content('Sample App')
end
it "should have the title 'Home'" do
visit '/static_pages/home'
expect(page).to have_title("Ruby on Rails Tutorial Sample App | Home")
end
end
describe "Help page" do
it "should have the content 'Help'" do
visit '/static_pages/help'
expect(page).to have_content('Help')
end
it "should have the title 'Help'" do
visit '/static_pages/help'
expect(page).to have_title("Ruby on Rails Tutorial Sample App | Help")
end
end
describe "About page" do
it "should have the content 'About Us'" do
visit '/static_pages/about'
expect(page).to have_content('About Us')
end
it "should have the title 'About Us'" do
visit '/static_pages/about'
expect(page).to have_title('Ruby on Rails Tutorial Sample App | About Us')
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment