Skip to content

Commit

Permalink
Added the pages controller.
Browse files Browse the repository at this point in the history
  • Loading branch information
ephox-rob committed Mar 6, 2011
1 parent 8e38e4f commit ae8a7b1
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/controllers/pages_controller.rb
@@ -0,0 +1,8 @@
class PagesController < ApplicationController
def home
end

def contact
end

end
2 changes: 2 additions & 0 deletions app/helpers/pages_helper.rb
@@ -0,0 +1,2 @@
module PagesHelper
end
2 changes: 2 additions & 0 deletions app/views/pages/contact.html.erb
@@ -0,0 +1,2 @@
<h1>Pages#contact</h1>
<p>Find me in app/views/pages/contact.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/pages/home.html.erb
@@ -0,0 +1,2 @@
<h1>Pages#home</h1>
<p>Find me in app/views/pages/home.html.erb</p>
4 changes: 4 additions & 0 deletions config/routes.rb
@@ -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.

Expand Down
19 changes: 19 additions & 0 deletions spec/controllers/pages_controller_spec.rb
@@ -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 changes: 15 additions & 0 deletions spec/helpers/pages_helper_spec.rb
@@ -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 changes: 5 additions & 0 deletions spec/views/pages/contact.html.erb_spec.rb
@@ -0,0 +1,5 @@
require 'spec_helper'

describe "pages/contact.html.erb" do
pending "add some examples to (or delete) #{__FILE__}"
end
5 changes: 5 additions & 0 deletions spec/views/pages/home.html.erb_spec.rb
@@ -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 ae8a7b1

Please sign in to comment.