diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-02-02 10:51:19 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-02-02 10:51:19 +1100 |
commit | d1eed079e1338249aa3b2881d07029ac4e71f4ed (patch) | |
tree | 18088ca9388e1b7bd27fffea8cb41fa52b618c34 /railties/lib/rails/generators/test_case.rb | |
parent | ddf2b4add33d5e54c5f5e7adacadbb50d3fa7b52 (diff) | |
parent | b9edb0c60c11025311fb06f2e60b3354f1b6cb09 (diff) | |
download | rails-d1eed079e1338249aa3b2881d07029ac4e71f4ed.tar.gz rails-d1eed079e1338249aa3b2881d07029ac4e71f4ed.tar.bz2 rails-d1eed079e1338249aa3b2881d07029ac4e71f4ed.zip |
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'railties/lib/rails/generators/test_case.rb')
-rw-r--r-- | railties/lib/rails/generators/test_case.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/test_case.rb b/railties/lib/rails/generators/test_case.rb index 38a3cbb035..6b97c69d8d 100644 --- a/railties/lib/rails/generators/test_case.rb +++ b/railties/lib/rails/generators/test_case.rb @@ -1,4 +1,5 @@ -require 'active_support/core_ext/class/inheritable_attributes' +require 'active_support/core_ext/class/attribute' +require 'active_support/core_ext/module/delegation' require 'active_support/core_ext/hash/reverse_merge' require 'rails/generators' require 'fileutils' @@ -28,8 +29,8 @@ module Rails class TestCase < ActiveSupport::TestCase include FileUtils - extlib_inheritable_accessor :destination_root, :current_path, :generator_class, - :default_arguments, :instance_writer => false + class_attribute :destination_root, :current_path, :generator_class, :default_arguments + delegate :destination_root, :current_path, :generator_class, :default_arguments, :to => :'self.class' # Generators frequently change the current path using +FileUtils.cd+. # So we need to store the path at file load and revert back to it after each test. |