Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

recem criadas paginas estaticas home help about

  • Loading branch information...
commit 823e1c11b5694a794a02bcbb28beb25a94a90101 1 parent 9e848bb
Amalrik Maia authored April 22, 2012
3  app/controllers/static_pages_controller.rb
@@ -4,4 +4,7 @@ def home
4 4
 
5 5
   def help
6 6
   end
  7
+
  8
+  def about
  9
+	end
7 10
 end
7  app/views/static_pages/about.html.erb
... ...
@@ -0,0 +1,7 @@
  1
+<h1>About Us</h1>
  2
+<p>
  3
+  The <a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
  4
+  is a project to make a book and screencasts to teach web development
  5
+  with <a href="http://rubyonrails.org/">Ruby on Rails</a>. This
  6
+  is the sample application for the tutorial.
  7
+</p>
9  app/views/static_pages/help.html.erb
... ...
@@ -1,2 +1,7 @@
1  
-<h1>StaticPages#help</h1>
2  
-<p>Find me in app/views/static_pages/help.html.erb</p>
  1
+<h1>Help</h1>
  2
+<p>
  3
+  Get help on the Ruby on Rails Tutorial at the
  4
+  <a href="http://railstutorial.org/help">Rails Tutorial help page</a>.
  5
+  To get help on this sample app, see the
  6
+  <a href="http://railstutorial.org/book">Rails Tutorial book</a>.
  7
+</p>
8  app/views/static_pages/home.html.erb
... ...
@@ -1,2 +1,6 @@
1  
-<h1>StaticPages#home</h1>
2  
-<p>Find me in app/views/static_pages/home.html.erb</p>
  1
+<h1>Sample App</h1>
  2
+<p>
  3
+  This is the home page for the
  4
+  <a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
  5
+  sample application.
  6
+</p>
2  config/routes.rb
... ...
@@ -1,7 +1,7 @@
1 1
 SampleApp::Application.routes.draw do
2 2
   get "static_pages/home"
3  
-
4 3
   get "static_pages/help"
  4
+  get "static_pages/about"
5 5
 
6 6
   # The priority is based upon order of creation:
7 7
   # first created -> highest priority.
27  spec/requests/static_pages_spec.rb
... ...
@@ -0,0 +1,27 @@
  1
+require 'spec_helper'
  2
+
  3
+describe "StaticPages" do
  4
+
  5
+	describe "Home page" do
  6
+		it "should have the content 'Sample App'" do
  7
+			visit '/static_pages/home'
  8
+			page.should have_content('Sample App')
  9
+		end
  10
+	end
  11
+
  12
+	describe "Help page" do
  13
+
  14
+    it "should have the content 'Help'" do
  15
+      visit '/static_pages/help'
  16
+      page.should have_content('Help')
  17
+    end
  18
+  end
  19
+
  20
+	describe "About page" do
  21
+
  22
+    it "should have the content 'About Us'" do
  23
+      visit '/static_pages/about'
  24
+      page.should have_content('About Us')
  25
+    end
  26
+  end
  27
+end

0 notes on commit 823e1c1

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