aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-07-15 11:33:36 +0200
committerJosé Valim <jose.valim@gmail.com>2009-07-15 11:33:36 +0200
commit0702e04e0d671227259f71f614adfe3f35f88b48 (patch)
tree9f3c34075fbb4ed4c227f66fd3168de86f8ab1f4 /railties/test
parenta06c825b464758a0c22f8b089a596e46f1bba5cb (diff)
downloadrails-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')
-rw-r--r--railties/test/generators/generators_test_helper.rb11
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