Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a rails test:all rake task #39221

Merged
merged 2 commits into from
May 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions guides/source/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ bin/rails test:system

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.
You can also run `bin/rails test:all` to run all tests, including system tests.

#### Creating Articles System Test

Expand Down
6 changes: 6 additions & 0 deletions railties/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Register a callback that will get called right after generators has finished.
Expand Down
6 changes: 6 additions & 0 deletions railties/lib/rails/test_unit/testing.rake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ namespace :test do
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
$: << "test"
Rails::TestUnit::Runner.rake_run(["test/lib/generators"])
Expand Down