diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-15 11:33:36 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-07-15 11:33:36 +0200 |
commit | 0702e04e0d671227259f71f614adfe3f35f88b48 (patch) | |
tree | 9f3c34075fbb4ed4c227f66fd3168de86f8ab1f4 /railties/test/generators | |
parent | a06c825b464758a0c22f8b089a596e46f1bba5cb (diff) | |
download | rails-0702e04e0d671227259f71f614adfe3f35f88b48.tar.gz rails-0702e04e0d671227259f71f614adfe3f35f88b48.tar.bz2 rails-0702e04e0d671227259f71f614adfe3f35f88b48.zip |
Refactored some generators to make use of improved invocations on thor.
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 |