mirror of https://github.com/rails/rails
Merge pull request #48898 from akhilgkrishnan/line-range-testing-guide
[skip ci] Testing by line range documentation added in guide
This commit is contained in:
commit
6db58ed7b6
|
@ -421,6 +421,12 @@ You can also run a test at a specific line by providing the line number.
|
|||
$ bin/rails test test/models/article_test.rb:6 # run specific test and line
|
||||
```
|
||||
|
||||
You can also run a range of tests by providing the line range.
|
||||
|
||||
```bash
|
||||
$ bin/rails test test/models/article_test.rb:6-20 # runs tests from line 6 to 20
|
||||
```
|
||||
|
||||
You can also run an entire directory of tests by providing the path to the directory.
|
||||
|
||||
```bash
|
||||
|
@ -438,6 +444,10 @@ You can run a single test by appending a line number to a filename:
|
|||
|
||||
bin/rails test test/models/user_test.rb:27
|
||||
|
||||
You can run multiple tests with in a line range by appending the line range to a filename:
|
||||
|
||||
bin/rails test test/models/user_test.rb:10-20
|
||||
|
||||
You can run multiple files and directories at the same time:
|
||||
|
||||
bin/rails test test/controllers test/integration/login_test.rb
|
||||
|
|
|
@ -3,6 +3,10 @@ Examples:
|
|||
|
||||
<%= executable %> test/models/user_test.rb:27
|
||||
|
||||
You can run multiple tests with in a line range by appending the line range to a filename:
|
||||
|
||||
<%= executable %> test/models/user_test.rb:10-20
|
||||
|
||||
You can run multiple files and directories at the same time:
|
||||
|
||||
<%= executable %> test/controllers test/integration/login_test.rb
|
||||
|
|
Loading…
Reference in New Issue