-
Jonathan Hefner authored
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.
Jonathan Hefner authoredFollow-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