Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Finish Chapter 3

  • Loading branch information...
commit 8b6c9f723c8c76d39f476b532fce08addcf47b92 1 parent 4aa50b9
@dirksiemers authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.