diff options
author | Carl Lerche <carllerche@mac.com> | 2009-10-16 12:49:39 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-10-16 12:51:02 -0700 |
commit | 2110a524a4913815d036786aa01319fd67db0ee2 (patch) | |
tree | f87858a81ac61642827c0617cad9eeceb44e8707 /railties/test/generators | |
parent | 6094e6516951444f8c3d6bb31f171af9fe96a02f (diff) | |
download | rails-2110a524a4913815d036786aa01319fd67db0ee2.tar.gz rails-2110a524a4913815d036786aa01319fd67db0ee2.tar.bz2 rails-2110a524a4913815d036786aa01319fd67db0ee2.zip |
Deprecate RAILS_ROOT in favor of Rails.root (which proxies to the application's object root)
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/generators_test_helper.rb | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index 7599bda8a2..ccf08c347c 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/railties/test/generators/generators_test_helper.rb @@ -1,24 +1,10 @@ -require 'test/unit' -require 'fileutils' - -fixtures = File.expand_path(File.join(File.dirname(__FILE__), '..', 'fixtures')) -if defined?(RAILS_ROOT) - RAILS_ROOT.replace fixtures -else - RAILS_ROOT = fixtures -end - -$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../../activemodel/lib" -$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../../activerecord/lib" -$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../../actionpack/lib" -$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../lib" # TODO: Fix this RAILS_ENV stuff RAILS_ENV = 'test' -require "rails/core" -require 'rails/generators' +require 'abstract_unit' +Rails.application.config.root = File.expand_path(File.join(File.dirname(__FILE__), '..', 'fixtures')) +require 'rails/generators' require 'rubygems' - require 'active_record' require 'action_dispatch' |