Permalink
Browse files

finished Ch 3 regular

  • Loading branch information...
1 parent 848db5e commit 973d6a00565dd7f3207d696bb5054e51ab9986a5 @kdironside committed May 18, 2012
@@ -7,5 +7,8 @@ def help
def about
end
+
+ def contact
+ end
end
@@ -0,0 +1,6 @@
+<% provide(:title, 'Contact') %>
+<h1>Contact</h1>
+<p>
+ Contact Ruby on Rails Tutorial about the sample app at the
+ <a href="http://railstutorial.org/contact">contact page</a>.
+</p>
View
@@ -3,5 +3,6 @@
get "static_pages/home"
get "static_pages/about"
get "static_pages/help"
+ get "static_pages/contact"
end
@@ -43,4 +43,18 @@
:text => "Ruby on Rails Tutorial Sample App | About Us")
end
end
+
+ describe "Contact page" do
+
+ it "should have the h1 'Contact'" do
+ visit '/static_pages/contact'
+ page.should have_selector('h1', :text => 'Contact')
+ end
+
+ it "should have the title 'Contact'" do
+ visit '/static_pages/contact'
+ page.should have_selector('title', :text => "Ruby on Rails Tutorial Sample App | Contact")
+ end
+ end
+
end

0 comments on commit 973d6a0

Please sign in to comment.