diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-06 18:31:28 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-07-06 18:31:28 +0200 |
commit | 66d1b968d108787114372144e97f4f817847892b (patch) | |
tree | fde26589fbb2fe4abc79e10e09068b4e5d18972b /railties/test/generators/generators_test_helper.rb | |
parent | eeb6a0786a061b640bcd90a5d90bd0d0215fe809 (diff) | |
download | rails-66d1b968d108787114372144e97f4f817847892b.tar.gz rails-66d1b968d108787114372144e97f4f817847892b.tar.bz2 rails-66d1b968d108787114372144e97f4f817847892b.zip |
Make specs pass on Ruby 1.9.
Diffstat (limited to 'railties/test/generators/generators_test_helper.rb')
-rw-r--r-- | railties/test/generators/generators_test_helper.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index 2ccedf814d..f6799eb6da 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/railties/test/generators/generators_test_helper.rb @@ -8,17 +8,23 @@ else RAILS_ROOT = fixtures end +$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../../activerecord/lib" $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../lib" require 'generators' 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.expand_path("#{File.dirname(__FILE__)}/../fixtures/tmp") + @destination_root ||= File.join(self.class.test_dir, 'fixtures', 'tmp') end def setup + cd self.class.test_dir rm_rf(destination_root) mkdir_p(destination_root) end |