Permalink
Browse files

added a Pages controller

  • Loading branch information...
1 parent 229a0dc commit e6212564e746f980f3b1c2b4a716feebe7302771 @kdironside committed Dec 15, 2011
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
@@ -0,0 +1,3 @@
+// Place all the styles related to the Pages controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,8 @@
+class PagesController < ApplicationController
+ def home
+ end
+
+ def contact
+ end
+
+end
@@ -0,0 +1,2 @@
+module PagesHelper
+end
@@ -0,0 +1,2 @@
+<h1>Pages#contact</h1>
+<p>Find me in app/views/pages/contact.html.erb</p>
@@ -0,0 +1,2 @@
+<h1>Pages#home</h1>
+<p>Find me in app/views/pages/home.html.erb</p>
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.
@@ -0,0 +1,19 @@
+require 'spec_helper'
+
+describe PagesController do
+
+ describe "GET 'home'" do
+ it "returns http success" do
+ get 'home'
+ response.should be_success
+ end
+ end
+
+ describe "GET 'contact'" do
+ it "returns http success" do
+ get 'contact'
+ response.should be_success
+ end
+ end
+
+end
@@ -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
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe "pages/contact.html.erb" do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe "pages/home.html.erb" do
+ pending "add some examples to (or delete) #{__FILE__}"
+end

0 comments on commit e621256

Please sign in to comment.