Skip to content

Commit

Permalink
Use COMPONENT_ROOT as app_root when present in test unit reporting.
Browse files Browse the repository at this point in the history
  • Loading branch information
simi committed Jun 13, 2020
1 parent 00c2d3e commit 32aebc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions railties/lib/rails/test_unit/reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def app_root
@app_root ||=
if defined?(ENGINE_ROOT)
ENGINE_ROOT
elsif defined?(COMPONENT_ROOT)
COMPONENT_ROOT
elsif Rails.respond_to?(:root)
Rails.root
end
Expand Down
8 changes: 0 additions & 8 deletions tools/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@
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"

Expand Down

0 comments on commit 32aebc7

Please sign in to comment.