diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2010-11-19 18:29:33 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-20 19:40:29 +0100 |
commit | d7db6a88734c3b666f4b85f266d223eff408b294 (patch) | |
tree | ccfa0ed1a0e92b9c3324bf92f92391f2d20be95c /actionmailer/lib | |
parent | 8d8062190ddd0452088f6ea917267ed993a70990 (diff) | |
download | rails-d7db6a88734c3b666f4b85f266d223eff408b294.tar.gz rails-d7db6a88734c3b666f4b85f266d223eff408b294.tar.bz2 rails-d7db6a88734c3b666f4b85f266d223eff408b294.zip |
class inheritable attributes is used no more! all internal use of class inheritable has been changed to class_attribute. class inheritable attributes has been deprecated.
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/test_case.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/actionmailer/lib/action_mailer/test_case.rb b/actionmailer/lib/action_mailer/test_case.rb index f4d1bb59f1..63e18147f6 100644 --- a/actionmailer/lib/action_mailer/test_case.rb +++ b/actionmailer/lib/action_mailer/test_case.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/class/attribute' + module ActionMailer class NonInferrableMailerError < ::StandardError def initialize(name) @@ -15,11 +17,11 @@ module ActionMailer module ClassMethods def tests(mailer) - write_inheritable_attribute(:mailer_class, mailer) + self._mailer_class = mailer end def mailer_class - if mailer = read_inheritable_attribute(:mailer_class) + if mailer = self._mailer_class mailer else tests determine_default_mailer(name) @@ -65,6 +67,7 @@ module ActionMailer end included do + class_attribute :_mailer_class setup :initialize_test_deliveries setup :set_expected_mail end |