Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a Pages controller

  • Loading branch information...
commit 5d81ca0d94dfd68f7b0156768c0e9dd2874d4814 1 parent cb7e51f
ndesell authored
8 app/controllers/pages_controller.rb
View
@@ -0,0 +1,8 @@
+class PagesController < ApplicationController
+ def home
+ end
+
+ def contact
+ end
+
+end
2  app/helpers/pages_helper.rb
View
@@ -0,0 +1,2 @@
+module PagesHelper
+end
2  app/views/pages/contact.html.erb
View
@@ -0,0 +1,2 @@
+<h1>Pages#contact</h1>
+<p>Find me in app/views/pages/contact.html.erb</p>
2  app/views/pages/home.html.erb
View
@@ -0,0 +1,2 @@
+<h1>Pages#home</h1>
+<p>Find me in app/views/pages/home.html.erb</p>
4 config/routes.rb
View
@@ -1,4 +1,8 @@
SampleApp::Application.routes.draw do
+ get "pages/home"
+
+ get "pages/contact"
+
# The priority is based upon order of creation:
# first created -> highest priority.
19 spec/controllers/pages_controller_spec.rb
View
@@ -0,0 +1,19 @@
+require 'spec_helper'
+
+describe PagesController do
+
+ describe "GET 'home'" do
+ it "should be successful" do
+ get 'home'
+ response.should be_success
+ end
+ end
+
+ describe "GET 'contact'" do
+ it "should be successful" do
+ get 'contact'
+ response.should be_success
+ end
+ end
+
+end
15 spec/helpers/pages_helper_spec.rb
View
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the PagesHelper. For example:
+#
+# describe PagesHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# helper.concat_strings("this","that").should == "this that"
+# end
+# end
+# end
+describe PagesHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
5 spec/views/pages/contact.html.erb_spec.rb
View
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe "pages/contact.html.erb" do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
5 spec/views/pages/home.html.erb_spec.rb
View
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe "pages/home.html.erb" do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
Please sign in to comment.
Something went wrong with that request. Please try again.