From e5ab4b0d07ade8d89d633ca744c0eafbc53ee921 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 31 Jan 2010 18:32:28 -0800 Subject: Convert to class_attribute --- railties/lib/rails/generators/test_case.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'railties') 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. -- cgit v1.2.3