From b6f935bbf9b8470b370ea613dc61218849aabf89 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 21 Oct 2016 14:44:17 -0700 Subject: Use `on_load` to trigger commandline processing code We need to use on_load so that plugins will get the same functionality --- railties/lib/rails/test_unit/railtie.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'railties/lib/rails/test_unit/railtie.rb') diff --git a/railties/lib/rails/test_unit/railtie.rb b/railties/lib/rails/test_unit/railtie.rb index ec91673e40..746120e6a1 100644 --- a/railties/lib/rails/test_unit/railtie.rb +++ b/railties/lib/rails/test_unit/railtie.rb @@ -1,3 +1,5 @@ +require "rails/test_unit/line_filtering" + if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any? ENV["RAILS_ENV"] ||= "test" end @@ -11,6 +13,12 @@ module Rails c.integration_tool :test_unit end + initializer "test_unit.line_filtering" do + ActiveSupport.on_load(:active_support_test_case) { + ActiveSupport::TestCase.extend Rails::LineFiltering + } + end + rake_tasks do load "rails/test_unit/testing.rake" end -- cgit v1.2.3