File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
railties/lib/rails/commands/test Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -421,6 +421,12 @@ You can also run a test at a specific line by providing the line number.
421
421
$ bin/rails test test/models/article_test.rb:6 # run specific test and line
422
422
```
423
423
424
+ You can also run a range of tests by providing the line range.
425
+
426
+ ``` bash
427
+ $ bin/rails test test/models/article_test.rb:6-20 # runs tests from line 6 to 20
428
+ ```
429
+
424
430
You can also run an entire directory of tests by providing the path to the directory.
425
431
426
432
``` bash
@@ -438,6 +444,10 @@ You can run a single test by appending a line number to a filename:
438
444
439
445
bin/rails test test/models/user_test.rb:27
440
446
447
+ You can run multiple tests with in a line range by appending the line range to a filename:
448
+
449
+ bin/rails test test/models/user_test.rb:10-20
450
+
441
451
You can run multiple files and directories at the same time:
442
452
443
453
bin/rails test test/controllers test/integration/login_test.rb
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ Examples:
3
3
4
4
<%= executable %> test/models/user_test.rb:27
5
5
6
+ You can run multiple tests with in a line range by appending the line range to a filename:
7
+
8
+ <%= executable %> test/models/user_test.rb:10-20
9
+
6
10
You can run multiple files and directories at the same time:
7
11
8
12
<%= executable %> test/controllers test/integration/login_test.rb
You can’t perform that action at this time.
0 commit comments