From 85efa3a2cf110a2bc81cffcadc5056ed93128bed Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Fri, 26 May 2017 15:22:57 +0930 Subject: Prevent a redefinition warning when the real Rails.root appears --- tools/test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools') 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 -- cgit v1.2.3