File tree 2 files changed +3
-3
lines changed
railties/lib/rails/test_unit
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 5
5
6
6
module Rails
7
7
class TestUnitReporter < Minitest ::StatisticsReporter
8
+ class_attribute :app_root
8
9
class_attribute :executable , default : "rails test"
9
10
10
11
def record ( result )
@@ -79,11 +80,9 @@ def format_rerun_snippet(result)
79
80
end
80
81
81
82
def app_root
82
- @app_root ||=
83
+ @app_root ||= self . class . app_root ||
83
84
if defined? ( ENGINE_ROOT )
84
85
ENGINE_ROOT
85
- elsif defined? ( COMPONENT_ROOT )
86
- COMPONENT_ROOT
87
86
elsif Rails . respond_to? ( :root )
88
87
Rails . root
89
88
end
Original file line number Diff line number Diff line change 12
12
require "active_support/test_case"
13
13
14
14
ActiveSupport ::TestCase . extend Rails ::LineFiltering
15
+ Rails ::TestUnitReporter . app_root = COMPONENT_ROOT
15
16
Rails ::TestUnitReporter . executable = "bin/test"
16
17
17
18
Rails ::TestUnit ::Runner . parse_options ( ARGV )
You can’t perform that action at this time.
0 commit comments