Skip to content

Commit

Permalink
add About and Help StaticPage and its specs
Browse files Browse the repository at this point in the history
  • Loading branch information
hoornet committed Nov 28, 2013
1 parent 4df04bb commit bec842e
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 20 deletions.
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ gem 'rails', '3.2.15'

group :test, :development do
gem 'sqlite3'
gem 'rspec-rails'
#gem 'rspec-rails'
gem 'rspec-rails', '2.9.0'
end

group :production do
Expand All @@ -16,7 +17,7 @@ group :production do
end

group :test do
gem'capybara'
gem 'capybara', '1.1.2'
end

# Gems used only for assets and not required
Expand Down
46 changes: 32 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,27 @@ GEM
multi_json (~> 1.0)
arel (3.0.3)
builder (3.0.4)
capybara (2.2.0)
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
diff-lcs (1.2.5)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (2.0.2)
ffi (1.9.3)
ffi (1.9.3-x86-mingw32)
hike (1.2.3)
i18n (0.6.5)
journey (1.0.4)
Expand All @@ -59,8 +64,11 @@ GEM
mime-types (1.25.1)
mini_portile (0.5.2)
multi_json (1.8.2)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
nokogiri (1.6.0-x86-mingw32)
mini_portile (~> 0.5.0)
pg (0.17.0)
pg (0.17.0-x86-mingw32)
polyglot (0.3.3)
rack (1.4.5)
Expand Down Expand Up @@ -93,27 +101,36 @@ GEM
rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
rspec-rails (2.14.0)
rspec (2.9.0)
rspec-core (~> 2.9.0)
rspec-expectations (~> 2.9.0)
rspec-mocks (~> 2.9.0)
rspec-core (2.9.0)
rspec-expectations (2.9.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
rspec-rails (2.9.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec (~> 2.9.0)
rubyzip (1.0.0)
sass (3.2.12)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
selenium-webdriver (2.37.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip (~> 1.0.0)
websocket (~> 1.0.4)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.8)
sqlite3 (1.3.8-x86-mingw32)
thor (0.18.1)
tilt (1.4.1)
Expand All @@ -124,20 +141,21 @@ GEM
uglifier (2.3.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
xpath (2.0.0)
websocket (1.0.7)
xpath (0.1.4)
nokogiri (~> 1.3)

PLATFORMS
x86-mingw32

DEPENDENCIES
capybara
capybara (= 1.1.2)
coffee-rails (~> 3.2.1)
jquery-rails
pg
rails (= 3.2.15)
rails_12factor
rspec-rails
rspec-rails (= 2.9.0)
sass-rails (~> 3.2.3)
sqlite3
uglifier (>= 1.0.3)
4 changes: 4 additions & 0 deletions app/controllers/static_pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ def home

def help
end

def about

end
end
14 changes: 13 additions & 1 deletion app/views/static_pages/help.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
<h1>StaticPages#help</h1>

<!DOCTYPE html>
<html>
<head>
<title>Ruby on Rails Tutorial Sample App | Help</title>
</head>
<body>

<h1>Help</h1>
<p>Find me in app/views/static_pages/help.html.erb</p>

</body>
</html>

20 changes: 18 additions & 2 deletions app/views/static_pages/home.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
<h1>StaticPages#home</h1>
<p>Find me in app/views/static_pages/home.html.erb</p>
<!DOCTYPE html>
<html>
<head>
<title>Ruby on Rails Tutorial Sample App | Home</title>
</head>
<body>
<h1>Sample App</h1>
<p>
Sample App
This is the home for the
<a href="http://railstutorial.org">Ruby on Rails tutorial</a>
sample applications
</p>

</body>
</html>


2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SampleApp::Application.routes.draw do
get "static_pages/home"

get "static_pages/help"
get "static_pages/about"

# The priority is based upon order of creation:
# first created -> highest priority.
Expand Down

0 comments on commit bec842e

Please sign in to comment.