adding the silly hello world controller

This commit is contained in:
Dan Buch 2011-08-08 21:21:18 -04:00
parent 6b5ccdcc16
commit 875b2f1ab1
6 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,5 @@
class HelloController < ApplicationController
def world
end
end

View File

@ -0,0 +1,2 @@
module HelloHelper
end

View File

@ -0,0 +1,11 @@
<h1>Several increasingly silly ways of displaying &ldquo;Hello world!&rdquo;:</h1>
<p><%= "Hello world!" %></p>
<p><%= "Hello" + " world!" %></p>
<p><%= w = "world"
"Hello #{w}!" %></p>
<p><%= 'H' + ?e.chr + ('l' * 2) %><%= ('o word!').gsub('d', 'ld')%></p>
<% hello = "Hello" %>
<% world = "world!" %>
<%= hello %> <%= world %>

View File

@ -1,4 +1,6 @@
Status::Application.routes.draw do Status::Application.routes.draw do
get "hello/world"
get "status/index" get "status/index"
# The priority is based upon order of creation: # The priority is based upon order of creation:

View File

@ -0,0 +1,9 @@
require 'test_helper'
class HelloControllerTest < ActionController::TestCase
test "should get world" do
get :world
assert_response :success
end
end

View File

@ -0,0 +1,4 @@
require 'test_helper'
class HelloHelperTest < ActionView::TestCase
end