Use COMPONENT_ROOT as app_root when present in test unit reporting.

This commit is contained in:
Josef Šimánek 2020-06-13 20:30:25 +02:00
parent 00c2d3e1e6
commit 32aebc76cb
No known key found for this signature in database
GPG Key ID: 375E76A19719F67B
2 changed files with 2 additions and 8 deletions

View File

@ -82,6 +82,8 @@ module Rails
@app_root ||=
if defined?(ENGINE_ROOT)
ENGINE_ROOT
elsif defined?(COMPONENT_ROOT)
COMPONENT_ROOT
elsif Rails.respond_to?(:root)
Rails.root
end

View File

@ -11,14 +11,6 @@ require "rails/test_unit/line_filtering"
require "active_support"
require "active_support/test_case"
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"