Skip to content

Commit

Permalink
added pages controller
Browse files Browse the repository at this point in the history
  • Loading branch information
beezee committed Jul 22, 2011
1 parent 7e86d6b commit 6db3636
Show file tree
Hide file tree
Showing 10 changed files with 158 additions and 0 deletions.
96 changes: 96 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,96 @@
GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.9)
actionpack (= 3.0.9)
mail (~> 2.2.19)
actionpack (3.0.9)
activemodel (= 3.0.9)
activesupport (= 3.0.9)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.5.0)
rack (~> 1.2.1)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
activemodel (3.0.9)
activesupport (= 3.0.9)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activerecord (3.0.9)
activemodel (= 3.0.9)
activesupport (= 3.0.9)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
activeresource (3.0.9)
activemodel (= 3.0.9)
activesupport (= 3.0.9)
activesupport (3.0.9)
arel (2.0.10)
builder (2.1.2)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
i18n (0.5.0)
mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
nokogiri (1.5.0-x86-mingw32)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.9)
actionmailer (= 3.0.9)
actionpack (= 3.0.9)
activerecord (= 3.0.9)
activeresource (= 3.0.9)
activesupport (= 3.0.9)
bundler (~> 1.0)
railties (= 3.0.9)
railties (3.0.9)
actionpack (= 3.0.9)
activesupport (= 3.0.9)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.4)
rake (0.9.2)
rdoc (3.8)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.6.0)
sqlite3 (1.3.3-x86-mingw32)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.29)
webrat (0.7.1)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)

PLATFORMS
x86-mingw32

DEPENDENCIES
rails (= 3.0.9)
rspec-rails (= 2.6.1)
sqlite3 (= 1.3.3)
webrat (= 0.7.1)
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 @@
Bigdog::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 6db3636

Please sign in to comment.