Skip to content

Instantly share code, notes, and snippets.

@yetanothernguyen
Created February 5, 2012 09:47
Show Gist options
  • Save yetanothernguyen/1744467 to your computer and use it in GitHub Desktop.
Save yetanothernguyen/1744467 to your computer and use it in GitHub Desktop.
Pages Controller Spec
require 'spec_helper'
describe PagesController do
render_views
describe "GET 'home'" do
it "returns http success" 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 Sampe App | Home")
end
end
describe "GET 'contact'" do
it "returns http success" do
get 'contact'
response.should be_success
end
it "should have the right title" do
get 'home'
response.should have_selector("title", :content => "Ruby on Rails Tutorial Sampe App | Contact")
end
end
describe "GET 'about'" do
it "returns http success" do
get 'about'
response.should be_success
end
it "should have the right title" do
get 'home'
response.should have_selector("title", :content => "Ruby on Rails Tutorial Sampe App | About")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment