mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Adds a rails test:all rake task (#39221)
* Adds a rails test:all rake task This task runs all tests, including system tests. * Better placement + slight tweak of the comment Co-authored-by: David Heinemeier Hansson <david@loudthinking.com>
This commit is contained in:
parent
f834f2aea8
commit
9488712365
3 changed files with 13 additions and 0 deletions
|
@ -857,6 +857,7 @@ bin/rails test:system
|
||||||
|
|
||||||
NOTE: By default, running `bin/rails test` won't run your system tests.
|
NOTE: By default, running `bin/rails test` won't run your system tests.
|
||||||
Make sure to run `bin/rails test:system` to actually run them.
|
Make sure to run `bin/rails test:system` to actually run them.
|
||||||
|
You can also run `bin/rails test:all` to run all tests, including system tests.
|
||||||
|
|
||||||
#### Creating Articles System Test
|
#### Creating Articles System Test
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
* Adds `rails test:all` for running all tests in the test directory.
|
||||||
|
|
||||||
|
This runs all test files in the test directory, including system tests.
|
||||||
|
|
||||||
|
*Niklas Häusele*
|
||||||
|
|
||||||
* Add `config.generators.after_generate` for processing to generated files.
|
* Add `config.generators.after_generate` for processing to generated files.
|
||||||
|
|
||||||
Register a callback that will get called right after generators has finished.
|
Register a callback that will get called right after generators has finished.
|
||||||
|
|
|
@ -35,6 +35,12 @@ namespace :test do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Runs all tests, including system tests"
|
||||||
|
task all: "test:prepare" do
|
||||||
|
$: << "test"
|
||||||
|
Rails::TestUnit::Runner.rake_run(["test/**/*_test.rb"])
|
||||||
|
end
|
||||||
|
|
||||||
task generators: "test:prepare" do
|
task generators: "test:prepare" do
|
||||||
$: << "test"
|
$: << "test"
|
||||||
Rails::TestUnit::Runner.rake_run(["test/lib/generators"])
|
Rails::TestUnit::Runner.rake_run(["test/lib/generators"])
|
||||||
|
|
Loading…
Reference in a new issue