diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/README.md | 2 | ||||
-rw-r--r-- | tools/test.rb | 7 |
2 files changed, 6 insertions, 3 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..52e9c19198 100644 --- a/tools/test.rb +++ b/tools/test.rb @@ -7,11 +7,12 @@ require "rails/test_unit/minitest_plugin" require "rails/test_unit/line_filtering" 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 |