working through 15.3

This commit is contained in:
Dan Buch 2011-08-09 06:33:51 -04:00
parent fba21e7939
commit c16c1361d3
8 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,5 @@
class FooController < ApplicationController
def index
end
end

View File

@ -1,5 +1,6 @@
class StatusController < ApplicationController
def index
@title = "System Status"
time = Time.now
@time = time
@ps = `ps aux`

View File

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

View File

@ -0,0 +1,2 @@
<h1>Foo#index</h1>
<p>Find me in app/views/foo/index.html.erb</p>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Hodgepodge</title>
<title>My Website - <%= @title %></title>
</head>
<body>
<%= yield %>

View File

@ -1,4 +1,6 @@
Hodgepodge::Application.routes.draw do
get "foo/index"
# The priority is based upon order of creation:
# first created -> highest priority.

View File

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

View File

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