diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2017-07-17 07:10:27 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 07:10:27 -0600 |
commit | 404eceba8c8f0951407c2508567f6abefec76e4c (patch) | |
tree | cb8c690084083b6aee4a70ad29c24c0050f88bed /tools | |
parent | e505bc8acd4448030fd4d2f85796bdb61d45a5b1 (diff) | |
parent | fbade51248ea48db87703ba7418badbd3ed85e36 (diff) | |
download | rails-404eceba8c8f0951407c2508567f6abefec76e4c.tar.gz rails-404eceba8c8f0951407c2508567f6abefec76e4c.tar.bz2 rails-404eceba8c8f0951407c2508567f6abefec76e4c.zip |
Merge branch 'master' into make-reverse-merge-bang-order-consistent
Diffstat (limited to 'tools')
-rw-r--r-- | tools/README.md | 2 | ||||
-rw-r--r-- | tools/test.rb | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/tools/README.md b/tools/README.md index b2e7e4b0ae..f133b27128 100644 --- a/tools/README.md +++ b/tools/README.md @@ -6,3 +6,5 @@ They aren't used by Rails apps directly. * `console` drops you in irb and loads local Rails repos * `profile` profiles `Kernel#require` to help reduce startup time * `line_statistics` provides CodeTools module and LineStatistics class to count lines + * `test` is loaded by every major component of Rails to simplify testing, for example: + `cd ./actioncable; bin/test ./path/to/actioncable_test_with_line_number.rb:5` diff --git a/tools/test.rb b/tools/test.rb index 71349a5974..774e4ec6c7 100644 --- a/tools/test.rb +++ b/tools/test.rb @@ -3,18 +3,22 @@ $: << File.expand_path("test", COMPONENT_ROOT) require "bundler" Bundler.setup -require "rails/test_unit/minitest_plugin" +require "rails/test_unit/runner" +require "rails/test_unit/reporter" require "rails/test_unit/line_filtering" +require "active_support" require "active_support/test_case" -module Rails - # Necessary to get rerun-snippts working. - def self.root +class << Rails + # Necessary to get rerun-snippets working. + def root @root ||= Pathname.new(COMPONENT_ROOT) end + alias __root root end ActiveSupport::TestCase.extend Rails::LineFiltering Rails::TestUnitReporter.executable = "bin/test" -Minitest.run_via = :rails -require "active_support/testing/autorun" + +Rails::TestUnit::Runner.parse_options(ARGV) +Rails::TestUnit::Runner.run(ARGV) |