-
Notifications
You must be signed in to change notification settings - Fork 21.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run test:prepare unless exact tests are specified
Follow-up to #46664. In #46664, `bin/rails test` _without_ args, `bin/rails test:all`, and `bin/rails test:system` were made to run the `test:prepare` task. However `bin/rails test` _with_ args (e.g. `bin/rails test --seed 1234`) and other `test:*` commands (e.g. `bin/rails test:models`) were not made to do so. This commit changes `bin/rails test` to always run `test:prepare` unless exact tests are specified via path arguments (e.g. `bin/rails test path/to/test.rb`) or a name pattern (e.g. `bin/rails test -n test_foo`). This commit also refactors the testing Rake tasks so that all of the logic regarding which files to load and whether to run `test:prepare` is contained within the `TestCommand` class.
- Loading branch information
1 parent
d7d93fa
commit 613c20b
Showing
5 changed files
with
160 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.