diff options
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/generators_test_helper.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index f6799eb6da..c9b9c33a4e 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/railties/test/generators/generators_test_helper.rb @@ -12,19 +12,18 @@ $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../../activerecord/lib" $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../lib" require 'generators' +CURRENT_PATH = File.expand_path(Dir.pwd) + class GeneratorsTestCase < Test::Unit::TestCase include FileUtils - def self.test_dir - @@test_dir = File.expand_path("#{File.dirname(__FILE__)}/../../") - end - def destination_root - @destination_root ||= File.join(self.class.test_dir, 'fixtures', 'tmp') + @destination_root ||= File.expand_path(File.join(File.dirname(__FILE__), + '..', '..', 'fixtures', 'tmp')) end def setup - cd self.class.test_dir + cd CURRENT_PATH rm_rf(destination_root) mkdir_p(destination_root) end |