diff options
Diffstat (limited to 'actionmailer/lib/action_mailer/test_case.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/test_case.rb | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/actionmailer/lib/action_mailer/test_case.rb b/actionmailer/lib/action_mailer/test_case.rb index c4de029694..529140dfad 100644 --- a/actionmailer/lib/action_mailer/test_case.rb +++ b/actionmailer/lib/action_mailer/test_case.rb @@ -1,3 +1,4 @@ +require 'active_support/test_case' require 'active_support/core_ext/class/attribute' module ActionMailer @@ -15,6 +16,12 @@ module ActionMailer include TestHelper + included do + class_attribute :_mailer_class + setup :initialize_test_deliveries + setup :set_expected_mail + end + module ClassMethods def tests(mailer) case mailer @@ -42,8 +49,6 @@ module ActionMailer end end - module InstanceMethods - protected def initialize_test_deliveries @@ -71,16 +76,8 @@ module ActionMailer def read_fixture(action) IO.readlines(File.join(Rails.root, 'test', 'fixtures', self.class.mailer_class.name.underscore, action)) end - end - - included do - class_attribute :_mailer_class - setup :initialize_test_deliveries - setup :set_expected_mail - end end include Behavior - end end |