aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/testing.md
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@gmail.com>2016-08-22 13:13:20 -0400
committerGitHub <noreply@github.com>2016-08-22 13:13:20 -0400
commit9caca55f7113ff0a298f93478ef90d768658cb27 (patch)
treed0eb53b3cfa508c89c3043ace19f3895dec80a5e /guides/source/testing.md
parent46a44243065dd1088458fc843875aa531b802a47 (diff)
parent90fbae6acc9aadc9480c9e7d40589f50ec1aa14e (diff)
downloadrails-9caca55f7113ff0a298f93478ef90d768658cb27.tar.gz
rails-9caca55f7113ff0a298f93478ef90d768658cb27.tar.bz2
rails-9caca55f7113ff0a298f93478ef90d768658cb27.zip
Merge pull request #25750 from go2null/go2null-test-directories
Specified directories for routes, views and jobs tests
Diffstat (limited to 'guides/source/testing.md')
-rw-r--r--guides/source/testing.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 26d50bec0c..4ca3236ec1 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -37,10 +37,12 @@ controllers/ helpers/ mailers/ test_helper.rb
fixtures/ integration/ models/
```
-The `models` directory is meant to hold tests for your models, the `controllers` directory is meant to hold tests for your controllers and the `integration` directory is meant to hold tests that involve any number of controllers interacting. There is also a directory for testing your mailers and one for testing view helpers.
+The `helpers`, `mailers`, and `models` directories are meant to hold tests for view helpers, mailers, and models, respectively. The `controllers` directory is meant to hold tests for controllers, routes, and views. The `integration` directory is meant to hold tests for interactions between controllers.
Fixtures are a way of organizing test data; they reside in the `fixtures` directory.
+A `jobs` directory will also be created when an associated test is first generated.
+
The `test_helper.rb` file holds the default configuration for your tests.
@@ -1085,7 +1087,7 @@ end
Testing Routes
--------------
-Like everything else in your Rails application, you can test your routes.
+Like everything else in your Rails application, you can test your routes. Route tests reside in `test/controllers/` or are part of controller tests.
NOTE: If your application has complex routes, Rails provides a number of useful helpers to test them.