Permalink
Browse files

Updated test

  • Loading branch information...
1 parent 0f56060 commit c3937c5450fc99dc3589c7df682850511a2f1a8b @rblumenthal committed Oct 6, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 spec/requests/static_pages_spec.rb
@@ -1,14 +1,15 @@
require 'spec_helper'
describe "Static Pages" do
+ let(:base_title){ "Ruby on Rails Tutorial" }
describe "Home page" do
it "should have content 'Sample App'" do
visit '/static_pages/home'
page.should have_selector('h1', :text => 'Sample App')
end
it "should have the right title" do
visit '/static_pages/home'
- page.should have_selector('title', :text => "Ruby on Rails Tutorial | Home")
+ page.should have_selector('title', :text => "#{base_title} | Home")
end
end
describe "Help Page" do
@@ -18,7 +19,7 @@
end
it "should have the right title" do
visit '/static_pages/help'
- page.should have_selector('title', :text => "Ruby on Rails Tutorial | Help")
+ page.should have_selector('title', :text => "#{base_title} | Help")
end
end
describe "About Page" do
@@ -28,7 +29,7 @@
end
it "should have the right title" do
visit '/static_pages/about'
- page.should have_selector('title', :text => "Ruby on Rails Tutorial | About")
+ page.should have_selector('title', :text => "#{base_title} | About")
end
end
describe "Contact Page" do
@@ -38,7 +39,7 @@
end
it "should have the right title" do
visit '/static_pages/contact'
- page.should have_selector('title', :text => "Ruby on Rails Tutorial | Contact")
+ page.should have_selector('title', :text => "#{base_title} | Contact")
end
end
end

0 comments on commit c3937c5

Please sign in to comment.