aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2018-04-22 15:58:27 -0500
committerGitHub <noreply@github.com>2018-04-22 15:58:27 -0500
commit76acaf6eb9ef3635e4c6f2ca9dba34edb50f541d (patch)
treeeee51ed75d692277ccefdbff84b2805cb94c0470 /guides
parenteae90a059a3673f3596c59b14201f45e950435a0 (diff)
parent915efecc1bc731ffcb734bbd841ba25f1aebc1c9 (diff)
downloadrails-76acaf6eb9ef3635e4c6f2ca9dba34edb50f541d.tar.gz
rails-76acaf6eb9ef3635e4c6f2ca9dba34edb50f541d.tar.bz2
rails-76acaf6eb9ef3635e4c6f2ca9dba34edb50f541d.zip
Merge pull request #32689 from yhirano55/update-testing-guides
Update results of command in Testing guides [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/testing.md27
1 files changed, 14 insertions, 13 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 82bf38c206..9fd29672c7 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -33,8 +33,8 @@ Rails creates a `test` directory for you as soon as you create a Rails project u
```bash
$ ls -F test
-controllers/ helpers/ mailers/ system/ test_helper.rb
-fixtures/ integration/ models/ application_system_test_case.rb
+application_system_test_case.rb fixtures/ integration/ models/ test_helper.rb
+controllers/ helpers/ mailers/ system/
```
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.
@@ -433,16 +433,8 @@ at the end of test run and so on. Check the documentation of the test runner as
```bash
$ bin/rails test -h
-minitest options:
- -h, --help Display this help.
- -s, --seed SEED Sets random seed. Also via env. Eg: SEED=n rake
- -v, --verbose Verbose. Show progress processing files.
- -n, --name PATTERN Filter run on /regexp/ or string.
- --exclude PATTERN Exclude /regexp/ or string from run.
-
-Known extensions: rails, pride
-
Usage: bin/rails test [options] [files or directories]
+
You can run a single test by appending a line number to a filename:
bin/rails test test/models/user_test.rb:27
@@ -453,13 +445,22 @@ You can run multiple files and directories at the same time:
By default test failures and errors are reported inline during a run.
-Rails options:
+minitest options:
+ -h, --help Display this help.
+ --no-plugins Bypass minitest plugin auto-loading (or set $MT_NO_PLUGINS).
+ -s, --seed SEED Sets random seed. Also via env. Eg: SEED=n rake
+ -v, --verbose Verbose. Show progress processing files.
+ -n, --name PATTERN Filter run on /regexp/ or string.
+ --exclude PATTERN Exclude /regexp/ or string from run.
+
+Known extensions: rails, pride
-w, --warnings Run with Ruby warnings enabled
- -e, --environment Run tests in the ENV environment
+ -e, --environment ENV Run tests in the ENV environment
-b, --backtrace Show the complete backtrace
-d, --defer-output Output test failures and errors after the test run
-f, --fail-fast Abort test run on first failure or error
-c, --[no-]color Enable color in the output
+ -p, --pride Pride. Show your testing pride!
```
Parallel Testing