Skip to content

Commit

Permalink
Prevent a redefinition warning when the real Rails.root appears
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewd committed May 26, 2017
1 parent 4cfcf1e commit 85efa3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/test.rb
Expand Up @@ -7,11 +7,12 @@
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
Expand Down

0 comments on commit 85efa3a

Please sign in to comment.