Skip to content
Browse files

Fix method redefinition warning

  • Loading branch information...
1 parent a6f88d0 commit 9d9f4dac06097f8b564df027d9bfdea9f7704888 @pixeltrix pixeltrix committed Dec 15, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 railties/test/generators/generators_test_helper.rb
View
8 railties/test/generators/generators_test_helper.rb
@@ -1,10 +1,14 @@
require 'abstract_unit'
+require 'active_support/core_ext/module/remove_method'
require 'rails/generators'
require 'rails/generators/test_case'
module Rails
- def self.root
- @root ||= File.expand_path(File.join(File.dirname(__FILE__), '..', 'fixtures'))
+ class << self
+ remove_possible_method :root
+ def root
+ @root ||= File.expand_path(File.join(File.dirname(__FILE__), '..', 'fixtures'))
+ end
end
end
Rails.application.config.root = Rails.root

0 comments on commit 9d9f4da

Please sign in to comment.
Something went wrong with that request. Please try again.