Created
February 5, 2012 09:47
-
-
Save yetanothernguyen/1744467 to your computer and use it in GitHub Desktop.
Pages Controller Spec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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