From 5bb1ab4adee636e1accaeedcfc7c9aad5a3b2fa1 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Fri, 28 Apr 2017 08:38:29 -0700 Subject: Update system test runner docs It wasn't clear that system tests don't run with the rest of the test suite and are part of a separate command. This documents the `test:system` command as well as update the Rails runner help documentation to make it clearer that system tests are run via their own command by default. --- railties/lib/rails/commands/help/USAGE | 17 +++++++++-------- railties/lib/rails/test_unit/testing.rake | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/railties/lib/rails/commands/help/USAGE b/railties/lib/rails/commands/help/USAGE index c5f8ab72bb..8eb98319d2 100644 --- a/railties/lib/rails/commands/help/USAGE +++ b/railties/lib/rails/commands/help/USAGE @@ -1,13 +1,14 @@ The most common rails commands are: - generate Generate new code (short-cut alias: "g") - console Start the Rails console (short-cut alias: "c") - server Start the Rails server (short-cut alias: "s") - test Run tests (short-cut alias: "t") - dbconsole Start a console for the database specified in config/database.yml - (short-cut alias: "db") + generate Generate new code (short-cut alias: "g") + console Start the Rails console (short-cut alias: "c") + server Start the Rails server (short-cut alias: "s") + test Run tests except system tests (short-cut alias: "t") + test:system Run system tests + dbconsole Start a console for the database specified in config/database.yml + (short-cut alias: "db") <% unless engine? %> - new Create a new Rails application. "rails new my_app" creates a - new application called MyApp in "./my_app" + new Create a new Rails application. "rails new my_app" creates a + new application called MyApp in "./my_app" <% end %> All commands can be run with -h (or --help) for more information. diff --git a/railties/lib/rails/test_unit/testing.rake b/railties/lib/rails/test_unit/testing.rake index ef19bd7626..33408081f1 100644 --- a/railties/lib/rails/test_unit/testing.rake +++ b/railties/lib/rails/test_unit/testing.rake @@ -48,6 +48,7 @@ namespace :test do Minitest.rake_run(["test/controllers", "test/mailers", "test/functional"]) end + desc "Run system tests only" task system: "test:prepare" do $: << "test" Minitest.rake_run(["test/system"]) -- cgit v1.2.3