aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-05-26 15:22:57 +0930
committerMatthew Draper <matthew@trebex.net>2017-05-26 15:22:57 +0930
commit85efa3a2cf110a2bc81cffcadc5056ed93128bed (patch)
tree02aba882a52eae19a5c4a1b99bde2986f5e6b614 /tools
parent4cfcf1ee542706c92c6c9b2e973e81b673fb220f (diff)
downloadrails-85efa3a2cf110a2bc81cffcadc5056ed93128bed.tar.gz
rails-85efa3a2cf110a2bc81cffcadc5056ed93128bed.tar.bz2
rails-85efa3a2cf110a2bc81cffcadc5056ed93128bed.zip
Prevent a redefinition warning when the real Rails.root appears
Diffstat (limited to 'tools')
-rw-r--r--tools/test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/test.rb b/tools/test.rb
index 71349a5974..1a1eca8f95 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
+class << Rails
# Necessary to get rerun-snippts working.
- def self.root
+ def root
@root ||= Pathname.new(COMPONENT_ROOT)
end
+ alias __root root
end
ActiveSupport::TestCase.extend Rails::LineFiltering