diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-12-15 20:04:54 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-12-17 03:58:34 +0000 |
commit | 9d9f4dac06097f8b564df027d9bfdea9f7704888 (patch) | |
tree | 70ace8434e88994eaadb04e5aa42d405fcb8cd54 /railties/test | |
parent | a6f88d0924649c70d74efe5a09f9abd3117c3920 (diff) | |
download | rails-9d9f4dac06097f8b564df027d9bfdea9f7704888.tar.gz rails-9d9f4dac06097f8b564df027d9bfdea9f7704888.tar.bz2 rails-9d9f4dac06097f8b564df027d9bfdea9f7704888.zip |
Fix method redefinition warning
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/generators_test_helper.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index 32a3d072c9..77ec2f1c0c 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/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 |