Skip to content
Browse files

Finish Chapter 3

  • Loading branch information...
1 parent 4aa50b9 commit 8b6c9f723c8c76d39f476b532fce08addcf47b92 @dirksiemers committed Jun 5, 2012
Showing with 8 additions and 3 deletions.
  1. +0 −1 app/views/static_pages/home.html.erb
  2. +8 −2 spec/requests/static_pages_spec.rb
View
1 app/views/static_pages/home.html.erb
@@ -1,4 +1,3 @@
-<% provide(:title, 'Home') %>
<h1>Sample App</h1>
<p>
This is the home page for the
View
10 spec/requests/static_pages_spec.rb
@@ -11,9 +11,15 @@
page.should have_selector('h1', :text => 'Sample App')
end
- it "should have the title 'Home'" do
+ it "should have the base title" do
visit '/static_pages/home'
- page.should have_selector('title', :text => "#{base_title} | Home")
+ page.should have_selector('title',
+ :text => "Ruby on Rails Tutorial Sample App")
+ end
+
+ it "should not have a custom page title" do
+ visit '/static_pages/home'
+ page.should_not have_selector('title', :text => '| Home')
end
end

0 comments on commit 8b6c9f7

Please sign in to comment.
Something went wrong with that request. Please try again.