aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/generators_test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators/generators_test_helper.rb')
-rw-r--r--railties/test/generators/generators_test_helper.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb
index 829a38c103..ccf08c347c 100644
--- a/railties/test/generators/generators_test_helper.rb
+++ b/railties/test/generators/generators_test_helper.rb
@@ -1,5 +1,5 @@
# TODO: Fix this RAILS_ENV stuff
-RAILS_ENV = 'test' unless defined?(RAILS_ENV)
+RAILS_ENV = 'test'
require 'abstract_unit'
Rails.application.config.root = File.expand_path(File.join(File.dirname(__FILE__), '..', 'fixtures'))
@@ -11,17 +11,12 @@ require 'action_dispatch'
CURRENT_PATH = File.expand_path(Dir.pwd)
Rails::Generators.no_color!
-module Rails
- def self.root
- @root ||= File.expand_path(File.join(File.dirname(__FILE__), '..', 'fixtures', 'tmp'))
- end
-end
-
class GeneratorsTestCase < Test::Unit::TestCase
include FileUtils
def destination_root
- Rails.root
+ @destination_root ||= File.expand_path(File.join(File.dirname(__FILE__),
+ '..', 'fixtures', 'tmp'))
end
def setup