From f990aca231f4a32dd4ce672727cdc2d376016de7 Mon Sep 17 00:00:00 2001 From: Glenn Vanderburg Date: Tue, 20 Apr 2010 22:34:26 -0400 Subject: [PATCH] index page --- tdd_samples/games/.gitignore | 1 + .../app/controllers/welcome_controller.rb | 5 + .../games/app/helpers/welcome_helper.rb | 2 + .../games/app/views/welcome/index.html.erb | 7 + tdd_samples/games/db/development.sqlite3 | Bin 14336 -> 0 bytes tdd_samples/games/log/development.log | 319 ------------------ tdd_samples/games/log/production.log | 0 tdd_samples/games/log/server.log | 0 tdd_samples/games/log/test.log | 0 .../controllers/welcome_controller_spec.rb | 17 + .../games/spec/helpers/welcome_helper_spec.rb | 11 + 11 files changed, 43 insertions(+), 319 deletions(-) create mode 100644 tdd_samples/games/.gitignore create mode 100644 tdd_samples/games/app/controllers/welcome_controller.rb create mode 100644 tdd_samples/games/app/helpers/welcome_helper.rb create mode 100644 tdd_samples/games/app/views/welcome/index.html.erb delete mode 100644 tdd_samples/games/db/development.sqlite3 delete mode 100644 tdd_samples/games/log/development.log delete mode 100644 tdd_samples/games/log/production.log delete mode 100644 tdd_samples/games/log/server.log delete mode 100644 tdd_samples/games/log/test.log create mode 100644 tdd_samples/games/spec/controllers/welcome_controller_spec.rb create mode 100644 tdd_samples/games/spec/helpers/welcome_helper_spec.rb diff --git a/tdd_samples/games/.gitignore b/tdd_samples/games/.gitignore new file mode 100644 index 0000000..6bfe6b1 --- /dev/null +++ b/tdd_samples/games/.gitignore @@ -0,0 +1 @@ +log diff --git a/tdd_samples/games/app/controllers/welcome_controller.rb b/tdd_samples/games/app/controllers/welcome_controller.rb new file mode 100644 index 0000000..309b704 --- /dev/null +++ b/tdd_samples/games/app/controllers/welcome_controller.rb @@ -0,0 +1,5 @@ +class WelcomeController < ApplicationController + def index + end + +end diff --git a/tdd_samples/games/app/helpers/welcome_helper.rb b/tdd_samples/games/app/helpers/welcome_helper.rb new file mode 100644 index 0000000..eeead45 --- /dev/null +++ b/tdd_samples/games/app/helpers/welcome_helper.rb @@ -0,0 +1,2 @@ +module WelcomeHelper +end diff --git a/tdd_samples/games/app/views/welcome/index.html.erb b/tdd_samples/games/app/views/welcome/index.html.erb new file mode 100644 index 0000000..8eb9749 --- /dev/null +++ b/tdd_samples/games/app/views/welcome/index.html.erb @@ -0,0 +1,7 @@ +

Welcome to Board Game Reviews!

+

Where do you want to go?

+ \ No newline at end of file diff --git a/tdd_samples/games/db/development.sqlite3 b/tdd_samples/games/db/development.sqlite3 deleted file mode 100644 index 72e0e12e4d6a140dad15bef8651fdfb32aa1383f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14336 zcmeI2&rj4q6vt;;wgV&>^k5GpW^7_)1BC7`maIWtp%5Z2KU|EQHp4RPHraNe?c#D= zxp?sp@}?&f{{-W~vx(k3>uVvp?ZN>MB*gcUc4oevH{17_*-U1p&o|fXK=S>z=ZJvk z$S|RlJm#Dbas#e@OF@D53H|v#c`!Q$k~Z{!u(wRrHdDV+Iuy{501~*)1bRCf(19Md=^5 zU@oZn@~|V_x=a*PvB(n-C&O^2!86^PRU>k*7os-9uJNPWP|QE-GkEEL7!T)?0}lP& ze;EcnrZ9bBmiA_CcTaXZt_|_m{CZP5qUP8QPXu<`^#=s?ETHYm>gKiuV|vMY3B&0E zcZ082U@RwF4GBOu`tS=z`j9ex7GC7$X?G;+4mc}uqyx|U8;=dOKYy=uI5(^86JbBt z7f8^M01`j~NB{{SfonxzTvgIpGh>?hY{tx*g}gbg#1%6)PGd^GFgFS@s_Y|S-`QtK z(2xKUKmter2_S*%L*SO0rt!&NO-g1?Nk}mL({TN-us4K#fEyYTKmter2_OL^aHRx_ zibn3zTy6;tb@+0-AzQb@`FzIA&tx;)%$CggQYJGf>HPnVu%GPPl?IGIh6IoR5sUfGWzK2Y0bp?x>(B3og*zN z!{lD%{#+dMvU?mfZMUIn7q$W?`thxRV#y4rYIdK}hjf@g0viB}!f$d|{_~ZN>#JIH l9MHFYFjvYX*Z;**rVy_G;iG>vB!C2v01`j~NZ>yr@EcLRsHFe^ diff --git a/tdd_samples/games/log/development.log b/tdd_samples/games/log/development.log deleted file mode 100644 index 85a616a..0000000 --- a/tdd_samples/games/log/development.log +++ /dev/null @@ -1,319 +0,0 @@ - SQL (0.2ms)  SELECT name - FROM sqlite_master - WHERE type = 'table' AND NOT name = 'sqlite_sequence' - - SQL (0.1ms) select sqlite_version(*) - SQL (2.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  - SQL (0.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") - SQL (0.1ms)  SELECT name - FROM sqlite_master - WHERE type = 'table' AND NOT name = 'sqlite_sequence' - - SQL (0.1ms) SELECT version FROM schema_migrations -Migrating to CreateUsers (20100421020456) - SQL (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "age" integer, "created_at" datetime, "updated_at" datetime)  - SQL (0.1ms) INSERT INTO schema_migrations (version) VALUES ('20100421020456') -Migrating to CreateGames (20100421020503) - SQL (0.3ms) CREATE TABLE "games" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "min_players" integer, "max_players" integer, "average_hours" float, "created_at" datetime, "updated_at" datetime)  - SQL (0.1ms) INSERT INTO schema_migrations (version) VALUES ('20100421020503') -Migrating to CreateReviews (20100421020540) - SQL (0.3ms) CREATE TABLE "reviews" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stars" integer, "comments" text, "user_id" integer, "game_id" integer, "created_at" datetime, "updated_at" datetime)  - SQL (0.1ms) INSERT INTO schema_migrations (version) VALUES ('20100421020540') - SQL (0.3ms)  SELECT name - FROM sqlite_master - WHERE type = 'table' AND NOT name = 'sqlite_sequence' - - SQL (0.1ms) SELECT version FROM schema_migrations - SQL (0.2ms)  SELECT name - FROM sqlite_master - WHERE type = 'table' AND NOT name = 'sqlite_sequence' - - SQL (0.0ms) PRAGMA index_list("games") - SQL (0.0ms) PRAGMA index_list("reviews") - SQL (0.0ms) PRAGMA index_list("users") - - -Processing GamesController#index (for 127.0.0.1 at 2010-04-20 22:06:12) [GET] - Game Load (0.4ms) SELECT * FROM "games"  -Rendering template within layouts/games -Rendering games/index -Completed in 25ms (View: 22, DB: 0) | 200 OK [http://localhost/games] - - -Processing GamesController#new (for 127.0.0.1 at 2010-04-20 22:06:15) [GET] -Rendering template within layouts/games -Rendering games/new -Completed in 12ms (View: 9, DB: 0) | 200 OK [http://localhost/games/new] - - -Processing GamesController#create (for 127.0.0.1 at 2010-04-20 22:06:18) [POST] - Parameters: {"game"=>{"name"=>"Cash and Guns", "max_players"=>"", "average_hours"=>"", "min_players"=>""}, "commit"=>"Create", "authenticity_token"=>"7SxOv+ZIUg/fKBuVcYp47Z3EM1ugquv8NsUkT1PCcOw="} - Game Create (0.4ms) INSERT INTO "games" ("name", "created_at", "max_players", "updated_at", "average_hours", "min_players") VALUES('Cash and Guns', '2010-04-21 02:06:18', NULL, '2010-04-21 02:06:18', NULL, NULL) -Redirected to http://localhost:3001/games/1 -Completed in 26ms (DB: 0) | 302 Found [http://localhost/games] - - -Processing GamesController#show (for 127.0.0.1 at 2010-04-20 22:06:18) [GET] - Parameters: {"id"=>"1"} - Game Load (0.2ms) SELECT * FROM "games" WHERE ("games"."id" = 1)  -Rendering template within layouts/games -Rendering games/show -Completed in 65ms (View: 5, DB: 0) | 200 OK [http://localhost/games/1] - - -Processing GamesController#edit (for 127.0.0.1 at 2010-04-20 22:06:20) [GET] - Parameters: {"id"=>"1"} - Game Load (0.2ms) SELECT * FROM "games" WHERE ("games"."id" = 1)  -Rendering template within layouts/games -Rendering games/edit -Completed in 12ms (View: 9, DB: 0) | 200 OK [http://localhost/games/1/edit] - - -Processing GamesController#update (for 127.0.0.1 at 2010-04-20 22:06:29) [PUT] - Parameters: {"game"=>{"name"=>"Cash and Guns", "max_players"=>"6", "average_hours"=>"0.75", "min_players"=>"3"}, "commit"=>"Update", "authenticity_token"=>"7SxOv+ZIUg/fKBuVcYp47Z3EM1ugquv8NsUkT1PCcOw=", "id"=>"1"} - Game Load (0.2ms) SELECT * FROM "games" WHERE ("games"."id" = 1)  - Game Update (0.2ms) UPDATE "games" SET "updated_at" = '2010-04-21 02:06:29', "average_hours" = 0.75, "max_players" = 6, "min_players" = 3 WHERE "id" = 1 -Redirected to http://localhost:3001/games/1 -Completed in 8ms (DB: 0) | 302 Found [http://localhost/games/1] - - -Processing GamesController#show (for 127.0.0.1 at 2010-04-20 22:06:29) [GET] - Parameters: {"id"=>"1"} - Game Load (0.2ms) SELECT * FROM "games" WHERE ("games"."id" = 1)  -Rendering template within layouts/games -Rendering games/show -Completed in 8ms (View: 2, DB: 0) | 200 OK [http://localhost/games/1] - - -Processing GamesController#edit (for 127.0.0.1 at 2010-04-20 22:06:30) [GET] - Parameters: {"id"=>"1"} - Game Load (0.2ms) SELECT * FROM "games" WHERE ("games"."id" = 1)  -Rendering template within layouts/games -Rendering games/edit -Completed in 9ms (View: 5, DB: 0) | 200 OK [http://localhost/games/1/edit] - - -Processing GamesController#index (for 127.0.0.1 at 2010-04-20 22:06:40) [GET] - Game Load (0.4ms) SELECT * FROM "games"  -Rendering template within layouts/games -Rendering games/index -Completed in 9ms (View: 5, DB: 0) | 200 OK [http://localhost/games] - - -Processing GamesController#new (for 127.0.0.1 at 2010-04-20 22:06:42) [GET] -Rendering template within layouts/games -Rendering games/new -Completed in 8ms (View: 4, DB: 0) | 200 OK [http://localhost/games/new] - - -Processing GamesController#create (for 127.0.0.1 at 2010-04-20 22:07:04) [POST] - Parameters: {"game"=>{"name"=>"Say Anything", "max_players"=>"6", "average_hours"=>"0.5", "min_players"=>"3"}, "commit"=>"Create", "authenticity_token"=>"7SxOv+ZIUg/fKBuVcYp47Z3EM1ugquv8NsUkT1PCcOw="} - Game Create (0.3ms) INSERT INTO "games" ("name", "created_at", "max_players", "updated_at", "average_hours", "min_players") VALUES('Say Anything', '2010-04-21 02:07:04', 6, '2010-04-21 02:07:04', 0.5, 3) -Redirected to http://localhost:3001/games/2 -Completed in 8ms (DB: 0) | 302 Found [http://localhost/games] - - -Processing GamesController#show (for 127.0.0.1 at 2010-04-20 22:07:04) [GET] - Parameters: {"id"=>"2"} - Game Load (0.2ms) SELECT * FROM "games" WHERE ("games"."id" = 2)  -Rendering template within layouts/games -Rendering games/show -Completed in 8ms (View: 3, DB: 0) | 200 OK [http://localhost/games/2] - - -Processing GamesController#edit (for 127.0.0.1 at 2010-04-20 22:07:06) [GET] - Parameters: {"id"=>"2"} - Game Load (0.2ms) SELECT * FROM "games" WHERE ("games"."id" = 2)  -Rendering template within layouts/games -Rendering games/edit -Completed in 9ms (View: 5, DB: 0) | 200 OK [http://localhost/games/2/edit] - - -Processing GamesController#index (for 127.0.0.1 at 2010-04-20 22:07:07) [GET] - Game Load (0.5ms) SELECT * FROM "games"  -Rendering template within layouts/games -Rendering games/index -Completed in 10ms (View: 6, DB: 0) | 200 OK [http://localhost/games] - - -Processing GamesController#edit (for 127.0.0.1 at 2010-04-20 22:07:11) [GET] - Parameters: {"id"=>"1"} - Game Load (0.5ms) SELECT * FROM "games" WHERE ("games"."id" = 1)  -Rendering template within layouts/games -Rendering games/edit -Completed in 9ms (View: 5, DB: 1) | 200 OK [http://localhost/games/1/edit] - - -Processing GamesController#update (for 127.0.0.1 at 2010-04-20 22:07:15) [PUT] - Parameters: {"game"=>{"name"=>"Cash and Guns", "max_players"=>"6", "average_hours"=>"1", "min_players"=>"3"}, "commit"=>"Update", "authenticity_token"=>"7SxOv+ZIUg/fKBuVcYp47Z3EM1ugquv8NsUkT1PCcOw=", "id"=>"1"} - Game Load (0.2ms) SELECT * FROM "games" WHERE ("games"."id" = 1)  - Game Update (0.2ms) UPDATE "games" SET "updated_at" = '2010-04-21 02:07:15', "average_hours" = 1.0 WHERE "id" = 1 -Redirected to http://localhost:3001/games/1 -Completed in 8ms (DB: 0) | 302 Found [http://localhost/games/1] - - -Processing GamesController#show (for 127.0.0.1 at 2010-04-20 22:07:15) [GET] - Parameters: {"id"=>"1"} - Game Load (0.2ms) SELECT * FROM "games" WHERE ("games"."id" = 1)  -Rendering template within layouts/games -Rendering games/show -Completed in 8ms (View: 2, DB: 0) | 200 OK [http://localhost/games/1] - - -Processing GamesController#index (for 127.0.0.1 at 2010-04-20 22:07:17) [GET] - Game Load (0.5ms) SELECT * FROM "games"  -Rendering template within layouts/games -Rendering games/index -Completed in 11ms (View: 7, DB: 1) | 200 OK [http://localhost/games] - - -Processing GamesController#new (for 127.0.0.1 at 2010-04-20 22:07:20) [GET] -Rendering template within layouts/games -Rendering games/new -Completed in 8ms (View: 4, DB: 0) | 200 OK [http://localhost/games/new] - - -Processing GamesController#create (for 127.0.0.1 at 2010-04-20 22:07:46) [POST] - Parameters: {"game"=>{"name"=>"Fluxx", "max_players"=>"10", "average_hours"=>"0.5", "min_players"=>"2"}, "commit"=>"Create", "authenticity_token"=>"7SxOv+ZIUg/fKBuVcYp47Z3EM1ugquv8NsUkT1PCcOw="} - Game Create (0.3ms) INSERT INTO "games" ("name", "created_at", "max_players", "updated_at", "average_hours", "min_players") VALUES('Fluxx', '2010-04-21 02:07:46', 10, '2010-04-21 02:07:46', 0.5, 2) -Redirected to http://localhost:3001/games/3 -Completed in 177ms (DB: 0) | 302 Found [http://localhost/games] - - -Processing GamesController#show (for 127.0.0.1 at 2010-04-20 22:07:46) [GET] - Parameters: {"id"=>"3"} - Game Load (0.2ms) SELECT * FROM "games" WHERE ("games"."id" = 3)  -Rendering template within layouts/games -Rendering games/show -Completed in 6ms (View: 2, DB: 0) | 200 OK [http://localhost/games/3] - - -Processing UsersController#index (for 127.0.0.1 at 2010-04-20 22:07:53) [GET] - User Load (0.4ms) SELECT * FROM "users"  -Rendering template within layouts/users -Rendering users/index -Completed in 12ms (View: 9, DB: 0) | 200 OK [http://localhost/users] - - -Processing UsersController#new (for 127.0.0.1 at 2010-04-20 22:07:55) [GET] -Rendering template within layouts/users -Rendering users/new -Completed in 10ms (View: 6, DB: 0) | 200 OK [http://localhost/users/new] - - -Processing UsersController#create (for 127.0.0.1 at 2010-04-20 22:07:58) [POST] - Parameters: {"commit"=>"Create", "authenticity_token"=>"7SxOv+ZIUg/fKBuVcYp47Z3EM1ugquv8NsUkT1PCcOw=", "user"=>{"name"=>"Glenn Vanderburg", "age"=>""}} - User Create (0.3ms) INSERT INTO "users" ("name", "created_at", "updated_at", "age") VALUES('Glenn Vanderburg', '2010-04-21 02:07:58', '2010-04-21 02:07:58', NULL) -Redirected to http://localhost:3001/users/1 -Completed in 8ms (DB: 0) | 302 Found [http://localhost/users] - - -Processing UsersController#show (for 127.0.0.1 at 2010-04-20 22:07:58) [GET] - Parameters: {"id"=>"1"} - User Load (0.2ms) SELECT * FROM "users" WHERE ("users"."id" = 1)  -Rendering template within layouts/users -Rendering users/show -Completed in 9ms (View: 5, DB: 0) | 200 OK [http://localhost/users/1] - - -Processing UsersController#index (for 127.0.0.1 at 2010-04-20 22:07:59) [GET] - User Load (0.4ms) SELECT * FROM "users"  -Rendering template within layouts/users -Rendering users/index -Completed in 8ms (View: 4, DB: 0) | 200 OK [http://localhost/users] - - -Processing UsersController#edit (for 127.0.0.1 at 2010-04-20 22:08:02) [GET] - Parameters: {"id"=>"1"} - User Load (0.2ms) SELECT * FROM "users" WHERE ("users"."id" = 1)  -Rendering template within layouts/users -Rendering users/edit -Completed in 11ms (View: 7, DB: 0) | 200 OK [http://localhost/users/1/edit] - - -Processing UsersController#update (for 127.0.0.1 at 2010-04-20 22:08:06) [PUT] - Parameters: {"commit"=>"Update", "authenticity_token"=>"7SxOv+ZIUg/fKBuVcYp47Z3EM1ugquv8NsUkT1PCcOw=", "id"=>"1", "user"=>{"name"=>"Glenn Vanderburg", "age"=>"30"}} - User Load (0.2ms) SELECT * FROM "users" WHERE ("users"."id" = 1)  - User Update (0.3ms) UPDATE "users" SET "updated_at" = '2010-04-21 02:08:06', "age" = 30 WHERE "id" = 1 -Redirected to http://localhost:3001/users/1 -Completed in 7ms (DB: 0) | 302 Found [http://localhost/users/1] - - -Processing UsersController#show (for 127.0.0.1 at 2010-04-20 22:08:06) [GET] - Parameters: {"id"=>"1"} - User Load (0.4ms) SELECT * FROM "users" WHERE ("users"."id" = 1)  -Rendering template within layouts/users -Rendering users/show -Completed in 6ms (View: 2, DB: 0) | 200 OK [http://localhost/users/1] - - -Processing UsersController#index (for 127.0.0.1 at 2010-04-20 22:08:08) [GET] - User Load (0.4ms) SELECT * FROM "users"  -Rendering template within layouts/users -Rendering users/index -Completed in 62ms (View: 59, DB: 0) | 200 OK [http://localhost/users] - - -Processing UsersController#new (for 127.0.0.1 at 2010-04-20 22:08:09) [GET] -Rendering template within layouts/users -Rendering users/new -Completed in 7ms (View: 3, DB: 0) | 200 OK [http://localhost/users/new] - - -Processing UsersController#create (for 127.0.0.1 at 2010-04-20 22:08:11) [POST] - Parameters: {"commit"=>"Create", "authenticity_token"=>"7SxOv+ZIUg/fKBuVcYp47Z3EM1ugquv8NsUkT1PCcOw=", "user"=>{"name"=>"Dave Fogel", "age"=>""}} - User Create (0.3ms) INSERT INTO "users" ("name", "created_at", "updated_at", "age") VALUES('Dave Fogel', '2010-04-21 02:08:11', '2010-04-21 02:08:11', NULL) -Redirected to http://localhost:3001/users/2 -Completed in 7ms (DB: 0) | 302 Found [http://localhost/users] - - -Processing UsersController#show (for 127.0.0.1 at 2010-04-20 22:08:11) [GET] - Parameters: {"id"=>"2"} - User Load (0.2ms) SELECT * FROM "users" WHERE ("users"."id" = 2)  -Rendering template within layouts/users -Rendering users/show -Completed in 6ms (View: 2, DB: 0) | 200 OK [http://localhost/users/2] - - -Processing UsersController#edit (for 127.0.0.1 at 2010-04-20 22:08:12) [GET] - Parameters: {"id"=>"2"} - User Load (0.2ms) SELECT * FROM "users" WHERE ("users"."id" = 2)  -Rendering template within layouts/users -Rendering users/edit -Completed in 7ms (View: 4, DB: 0) | 200 OK [http://localhost/users/2/edit] - - -Processing UsersController#update (for 127.0.0.1 at 2010-04-20 22:08:14) [PUT] - Parameters: {"commit"=>"Update", "authenticity_token"=>"7SxOv+ZIUg/fKBuVcYp47Z3EM1ugquv8NsUkT1PCcOw=", "id"=>"2", "user"=>{"name"=>"Dave Fogel", "age"=>"22"}} - User Load (0.2ms) SELECT * FROM "users" WHERE ("users"."id" = 2)  - User Update (0.2ms) UPDATE "users" SET "updated_at" = '2010-04-21 02:08:14', "age" = 22 WHERE "id" = 2 -Redirected to http://localhost:3001/users/2 -Completed in 7ms (DB: 0) | 302 Found [http://localhost/users/2] - - -Processing UsersController#show (for 127.0.0.1 at 2010-04-20 22:08:14) [GET] - Parameters: {"id"=>"2"} - User Load (0.2ms) SELECT * FROM "users" WHERE ("users"."id" = 2)  -Rendering template within layouts/users -Rendering users/show -Completed in 6ms (View: 2, DB: 0) | 200 OK [http://localhost/users/2] - - -Processing UsersController#index (for 127.0.0.1 at 2010-04-20 22:08:15) [GET] - User Load (0.4ms) SELECT * FROM "users"  -Rendering template within layouts/users -Rendering users/index -Completed in 65ms (View: 61, DB: 0) | 200 OK [http://localhost/users] - - -Processing ReviewsController#index (for 127.0.0.1 at 2010-04-20 22:08:19) [GET] - Review Load (0.3ms) SELECT * FROM "reviews"  -Rendering template within layouts/reviews -Rendering reviews/index -Completed in 17ms (View: 10, DB: 0) | 200 OK [http://localhost/reviews] - - -Processing ReviewsController#new (for 127.0.0.1 at 2010-04-20 22:08:21) [GET] -Rendering template within layouts/reviews -Rendering reviews/new -Completed in 11ms (View: 7, DB: 0) | 200 OK [http://localhost/reviews/new] diff --git a/tdd_samples/games/log/production.log b/tdd_samples/games/log/production.log deleted file mode 100644 index e69de29..0000000 diff --git a/tdd_samples/games/log/server.log b/tdd_samples/games/log/server.log deleted file mode 100644 index e69de29..0000000 diff --git a/tdd_samples/games/log/test.log b/tdd_samples/games/log/test.log deleted file mode 100644 index e69de29..0000000 diff --git a/tdd_samples/games/spec/controllers/welcome_controller_spec.rb b/tdd_samples/games/spec/controllers/welcome_controller_spec.rb new file mode 100644 index 0000000..4c3ae4b --- /dev/null +++ b/tdd_samples/games/spec/controllers/welcome_controller_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe WelcomeController do + + #Delete these examples and add some real ones + it "should use WelcomeController" do + controller.should be_an_instance_of(WelcomeController) + end + + + describe "GET 'index'" do + it "should be successful" do + get 'index' + response.should be_success + end + end +end diff --git a/tdd_samples/games/spec/helpers/welcome_helper_spec.rb b/tdd_samples/games/spec/helpers/welcome_helper_spec.rb new file mode 100644 index 0000000..30bd4b1 --- /dev/null +++ b/tdd_samples/games/spec/helpers/welcome_helper_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe WelcomeHelper do + + #Delete this example and add some real ones or delete this file + it "should be included in the object returned by #helper" do + included_modules = (class << helper; self; end).send :included_modules + included_modules.should include(WelcomeHelper) + end + +end