staticpages controller
babbys first test
[from now] 2012/04/17 01:20:26

diff --git a/app/views/static_pages/help.html.erb b/app/views/static_pages/help.html.erb
index 61896f5..4c1bce5 100644
--- a/app/views/static_pages/help.html.erb
+++ b/app/views/static_pages/help.html.erb
@@ -1,2 +1,8 @@
-<h1>StaticPages#help</h1>
-<p>Find me in app/views/static_pages/help.html.erb</p>
+<h1>Help Page</h1>
+<p>
+	This is the body text for a help page, with a
+	<div>
+	div
+	<div>
+	or two for the hell of it.
+</p>
\ No newline at end of file
[from now] 2012/04/17 01:42:40

diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb
index c76b925..953e2d7 100644
--- a/app/controllers/static_pages_controller.rb
+++ b/app/controllers/static_pages_controller.rb
@@ -4,4 +4,8 @@ class StaticPagesController < ApplicationController

   def help
   end
+
+  def about
+  end
+
 end
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
deleted file mode 100644
index 092b0a0..0000000
--- a/app/views/layouts/application.html.erb
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <title>SampleApp</title>
-  <%= stylesheet_link_tag    "application", :media => "all" %>
-  <%= javascript_include_tag "application" %>
-  <%= csrf_meta_tags %>
-</head>
-<body>
-
-<%= yield %>
-
-</body>
-</html>
diff --git a/config/routes.rb b/config/routes.rb
index 10ab8d2..fec869d 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -3,6 +3,8 @@ SampleApp::Application.routes.draw do

   get "static_pages/help"

+  get "static_pages/about"
+
   # The priority is based upon order of creation:
   # first created -> highest priority.
[from now] 2012/04/17 01:43:42

diff --git a/app/views/static_pages/about.html.erb b/app/views/static_pages/about.html.erb
new file mode 100644
index 0000000..e0697a3
--- /dev/null
+++ b/app/views/static_pages/about.html.erb
@@ -0,0 +1,4 @@
+<h1>About</h1>
+<p>
+	About us: herp a derr
+</p>
\ No newline at end of file
diff --git a/foobar b/foobar
new file mode 100644
index 0000000..092b0a0
--- /dev/null
+++ b/foobar
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>SampleApp</title>
+  <%= stylesheet_link_tag    "application", :media => "all" %>
+  <%= javascript_include_tag "application" %>
+  <%= csrf_meta_tags %>
+</head>
+<body>
+
+<%= yield %>
+
+</body>
+</html>
diff --git a/progress.txt b/progress.txt
new file mode 100644
index 0000000..d1cc825
--- /dev/null
+++ b/progress.txt
@@ -0,0 +1 @@
+3.3.2 Passing title texts
\ No newline at end of file
diff --git a/spec/requests/static_pages_spec.rb b/spec/requests/static_pages_spec.rb
new file mode 100644
index 0000000..f65a13b
--- /dev/null
+++ b/spec/requests/static_pages_spec.rb
@@ -0,0 +1,49 @@
+require 'spec_helper'
+
+describe 'Static pages' do
+
+  describe 'Home page' do
+
+    it 'should have the content "Sample App"' do
+      visit '/static_pages/home'
+      page.should have_content('Sample App')
+    end
+
+    it 'should have the right title' do
+      visit '/static_pages/home'
+      page.should have_selector('title',
+      :text => "Ruby on Rails Tutorial Sample App | Home")
+    end
+  end
+
+  describe 'Help page' do
+
+    it 'should have the content "Help"' do
+      visit '/static_pages/help'
+      page.should have_content('Help')
+    end
+
+    it 'should have the right title' do
+      visit '/static_pages/help'
+      page.should have_selector('title',
+      :text => "Ruby on Rails Tutorial Sample App | Help")
+    end
+  end
+
+  describe 'About page' do
+
+    it 'should have the content "About"' do
+      visit '/static_pages/about'
+      page.should have_content('About')
+    end
+
+    it 'should have the correct title' do
+      visit '/static_pages/about'
+      page.should have_selector('title',
+      :text => "Ruby on Rails Tutorial Sample App | About")
+    end
+
+  end
+
+
+end
\ No newline at end of file
[from now] 2012/04/18 00:44:54

diff --git a/app/views/static_pages/about.html.erb b/app/views/static_pages/about.html.erb
index e0697a3..18d7480 100644
--- a/app/views/static_pages/about.html.erb
+++ b/app/views/static_pages/about.html.erb
@@ -1,4 +1,15 @@
-<h1>About</h1>
-<p>
-	About us: herp a derr
-</p>
\ No newline at end of file
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>Ruby on Rails Tutorial Sample App | About</title>
+	</head>
+	<body>
+		<h1>About</h1>
+		<p>
+			The <a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
+			is a project to make a book and screencasts to teach web development
+			with <a href="http://rubyonrails.org/">Ruby on Rails</a>. This
+			is the sample application for the tutorial.
+		</p>
+	</body>
+</html>
\ No newline at end of file
diff --git a/app/views/static_pages/help.html.erb b/app/views/static_pages/help.html.erb
index 4c1bce5..95b9d35 100644
--- a/app/views/static_pages/help.html.erb
+++ b/app/views/static_pages/help.html.erb
@@ -1,8 +1,15 @@
-<h1>Help Page</h1>
-<p>
-	This is the body text for a help page, with a
-	<div>
-	div
-	<div>
-	or two for the hell of it.
-</p>
\ No newline at end of file
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>Ruby on Rails Tutorial Sample App | Help</title>
+	</head>
+	<body>
+		<h1>Help</h1>
+		<p>
+			Get help on the Ruby on Rails Tutorial at the
+			<a href="http://railstutorial.org/help">Rails Tutorial help page</a>.
+			To get help on this sample app, see the
+			<a href="http://railstutorial.org/book">Rails Tutorial book</a>.
+		</p>
+	</body>
+</html>
\ No newline at end of file
diff --git a/app/views/static_pages/home.html.erb b/app/views/static_pages/home.html.erb
index 12df05f..7216ebc 100644
--- a/app/views/static_pages/home.html.erb
+++ b/app/views/static_pages/home.html.erb
@@ -1,6 +1,14 @@
-<h1>Sample App</h1>
-<p>
-	This is the home page for the
-	<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
-	sample application.
-</p>
\ No newline at end of file
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>Ruby on Rails Tutorial Sample App | Home</title>
+	</head>
+	<body>
+		<h1>Sample App</h1>
+		<p>
+			This is the home page for the
+			<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
+			sample application.
+		</p>
+	</body>
+</html>
\ No newline at end of file
[from now] 2012/04/18 00:55:45

diff --git a/app/views/static_pages/about.html.erb b/app/views/static_pages/about.html.erb
index 18d7480..1f96868 100644
--- a/app/views/static_pages/about.html.erb
+++ b/app/views/static_pages/about.html.erb
@@ -1,10 +1,11 @@
+<% provide :title, 'About' %>
 <!DOCTYPE html>
 <html>
 	<head>
-		<title>Ruby on Rails Tutorial Sample App | About</title>
+		<title>Ruby on Rails Tutorial Sample App | <%= yield :title %></title>
 	</head>
 	<body>
-		<h1>About</h1>
+		<h1>Sample App</h1>
 		<p>
 			The <a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
 			is a project to make a book and screencasts to teach web development
diff --git a/app/views/static_pages/help.html.erb b/app/views/static_pages/help.html.erb
index 95b9d35..6f57989 100644
--- a/app/views/static_pages/help.html.erb
+++ b/app/views/static_pages/help.html.erb
@@ -1,10 +1,11 @@
+<% provide :title, 'Help'%>
 <!DOCTYPE html>
 <html>
 	<head>
-		<title>Ruby on Rails Tutorial Sample App | Help</title>
+		<title>Ruby on Rails Tutorial Sample App | <%= yield :title %></title>
 	</head>
 	<body>
-		<h1>Help</h1>
+		<h1>Sample App</h1>
 		<p>
 			Get help on the Ruby on Rails Tutorial at the
 			<a href="http://railstutorial.org/help">Rails Tutorial help page</a>.
diff --git a/app/views/static_pages/home.html.erb b/app/views/static_pages/home.html.erb
index 7216ebc..2418700 100644
--- a/app/views/static_pages/home.html.erb
+++ b/app/views/static_pages/home.html.erb
@@ -1,7 +1,8 @@
+<% provide :title, 'Home' %>
 <!DOCTYPE html>
 <html>
 	<head>
-		<title>Ruby on Rails Tutorial Sample App | Home</title>
+		<title>Ruby on Rails Tutorial Sample App | <%= yield :title %></title>
 	</head>
 	<body>
 		<h1>Sample App</h1>
[from now] 2012/04/18 01:25:15

diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
new file mode 100644
index 0000000..8196f97
--- /dev/null
+++ b/app/views/layouts/application.html.erb
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Ruby on Rails Tutorial Sample App | <%= yield :title %></title>
+  <%= stylesheet_link_tag    "application", :media => "all" %>
+  <%= javascript_include_tag "application" %>
+  <%= csrf_meta_tags %>
+</head>
+<body>
+
+<%= yield %>
+
+</body>
+</html>
diff --git a/app/views/static_pages/about.html.erb b/app/views/static_pages/about.html.erb
index 1f96868..86e8621 100644
--- a/app/views/static_pages/about.html.erb
+++ b/app/views/static_pages/about.html.erb
@@ -1,16 +1,8 @@
 <% provide :title, 'About' %>
-<!DOCTYPE html>
-<html>
-	<head>
-		<title>Ruby on Rails Tutorial Sample App | <%= yield :title %></title>
-	</head>
-	<body>
-		<h1>Sample App</h1>
-		<p>
-			The <a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
-			is a project to make a book and screencasts to teach web development
-			with <a href="http://rubyonrails.org/">Ruby on Rails</a>. This
-			is the sample application for the tutorial.
-		</p>
-	</body>
-</html>
\ No newline at end of file
+<h1>Sample App</h1>
+<p>
+	The <a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
+	is a project to make a book and screencasts to teach web development
+	with <a href="http://rubyonrails.org/">Ruby on Rails</a>. This
+	is the sample application for the tutorial.
+</p>
\ No newline at end of file
diff --git a/app/views/static_pages/help.html.erb b/app/views/static_pages/help.html.erb
index 6f57989..8b1d729 100644
--- a/app/views/static_pages/help.html.erb
+++ b/app/views/static_pages/help.html.erb
@@ -1,16 +1,8 @@
 <% provide :title, 'Help'%>
-<!DOCTYPE html>
-<html>
-	<head>
-		<title>Ruby on Rails Tutorial Sample App | <%= yield :title %></title>
-	</head>
-	<body>
-		<h1>Sample App</h1>
-		<p>
-			Get help on the Ruby on Rails Tutorial at the
-			<a href="http://railstutorial.org/help">Rails Tutorial help page</a>.
-			To get help on this sample app, see the
-			<a href="http://railstutorial.org/book">Rails Tutorial book</a>.
-		</p>
-	</body>
-</html>
\ No newline at end of file
+<h1>Sample App</h1>
+<p>
+	Get help on the Ruby on Rails Tutorial at the
+	<a href="http://railstutorial.org/help">Rails Tutorial help page</a>.
+	To get help on this sample app, see the
+	<a href="http://railstutorial.org/book">Rails Tutorial book</a>.
+</p>
\ No newline at end of file
diff --git a/app/views/static_pages/home.html.erb b/app/views/static_pages/home.html.erb
index 2418700..b9fd18c 100644
--- a/app/views/static_pages/home.html.erb
+++ b/app/views/static_pages/home.html.erb
@@ -1,15 +1,7 @@
 <% provide :title, 'Home' %>
-<!DOCTYPE html>
-<html>
-	<head>
-		<title>Ruby on Rails Tutorial Sample App | <%= yield :title %></title>
-	</head>
-	<body>
-		<h1>Sample App</h1>
-		<p>
-			This is the home page for the
-			<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
-			sample application.
-		</p>
-	</body>
-</html>
\ No newline at end of file
+<h1>Sample App</h1>
+<p>
+	This is the home page for the
+	<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
+	sample application.
+</p>
\ No newline at end of file
diff --git a/foobar b/foobar
deleted file mode 100644
index 092b0a0..0000000
--- a/foobar
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <title>SampleApp</title>
-  <%= stylesheet_link_tag    "application", :media => "all" %>
-  <%= javascript_include_tag "application" %>
-  <%= csrf_meta_tags %>
-</head>
-<body>
-
-<%= yield %>
-
-</body>
-</html>
blah
this thing
yeah