aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/generators.md
diff options
context:
space:
mode:
authorMike Moore <mike@blowmage.com>2012-10-07 22:59:42 -0600
committerMike Moore <mike@blowmage.com>2012-10-09 17:53:56 -0600
commit2a68f68aead9fd65ecac8062ca8efc15f5bab418 (patch)
tree632bf64b5a6974c2e47d5300ff8d15a143133af5 /guides/source/generators.md
parent0787cea3bb5e6f2c216e71090732bc55ee03c7dc (diff)
downloadrails-2a68f68aead9fd65ecac8062ca8efc15f5bab418.tar.gz
rails-2a68f68aead9fd65ecac8062ca8efc15f5bab418.tar.bz2
rails-2a68f68aead9fd65ecac8062ca8efc15f5bab418.zip
Update test locations
Change the default test locations to avoid confusion around the common testing terms "unit" and "functional". Add new rake tasks for the new locations, while maintaining backwards compatibility with the old rake tasks. New testing locations are as follows: app/models -> test/models (was test/units) app/helpers -> test/helpers (was test/units/helpers) app/controllers -> test/controllers (was test/functional) app/mailers -> test/mailers (was test/functional)
Diffstat (limited to 'guides/source/generators.md')
-rw-r--r--guides/source/generators.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/guides/source/generators.md b/guides/source/generators.md
index 0bcfa1dc68..d56bbe853c 100644
--- a/guides/source/generators.md
+++ b/guides/source/generators.md
@@ -176,7 +176,7 @@ $ rails generate scaffold User name:string
create db/migrate/20091120125558_create_users.rb
create app/models/user.rb
invoke test_unit
- create test/unit/user_test.rb
+ create test/models/user_test.rb
create test/fixtures/users.yml
route resources :users
invoke scaffold_controller
@@ -189,11 +189,11 @@ $ rails generate scaffold User name:string
create app/views/users/new.html.erb
create app/views/users/_form.html.erb
invoke test_unit
- create test/functional/users_controller_test.rb
+ create test/controllers/users_controller_test.rb
invoke helper
create app/helpers/users_helper.rb
invoke test_unit
- create test/unit/helpers/users_helper_test.rb
+ create test/helpers/users_helper_test.rb
invoke stylesheets
create app/assets/stylesheets/scaffold.css
```
@@ -350,7 +350,7 @@ $ rails generate scaffold Comment body:text
create db/migrate/20091120151323_create_comments.rb
create app/models/comment.rb
invoke shoulda
- create test/unit/comment_test.rb
+ create test/models/comment_test.rb
create test/fixtures/comments.yml
route resources :comments
invoke scaffold_controller
@@ -364,11 +364,11 @@ $ rails generate scaffold Comment body:text
create app/views/comments/_form.html.erb
create app/views/layouts/comments.html.erb
invoke shoulda
- create test/functional/comments_controller_test.rb
+ create test/controllers/comments_controller_test.rb
invoke my_helper
create app/helpers/comments_helper.rb
invoke shoulda
- create test/unit/helpers/comments_helper_test.rb
+ create test/helpers/comments_helper_test.rb
```
Fallbacks allow your generators to have a single responsibility, increasing code reuse and reducing the amount of duplication.