Skip to content

Instantly share code, notes, and snippets.

@caleywoods
Created January 28, 2011 18:03
Show Gist options
  • Save caleywoods/800664 to your computer and use it in GitHub Desktop.
Save caleywoods/800664 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe PagesController do
render_views
describe "GET 'home'" do
it "should be successful" do
get 'home'
response.should be_success
end
it "should have the right title" do
get 'home'
response.should have_selector("title",
:content => "Ruby on Rails Tutorial Sample App | Home")
end
end
describe "GET 'contact'" do
it "should be successful" do
get 'contact'
response.should be_success
end
it "should have the right title" do
get 'contact'
response.should have_selector("title",
:content => "Ruby on Rails Tutorial Sample App | Contact")
end
end
describe "GET 'about'" do
it "should be successful" do
get 'about'
response.should be_success
end
it "should have the right title" do
get 'about'
response.should have_selector("title",
:content => "Ruby on Rails Tutorial Sample App | About")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment