diff options
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer.rb | 2 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 4 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/collector.rb | 2 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/test_case.rb | 7 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/test_helper.rb | 12 | ||||
-rw-r--r-- | actionmailer/lib/rails/generators/mailer/USAGE | 5 |
6 files changed, 12 insertions, 20 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index cfbe2f1cbd..c45124be80 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2004-2012 David Heinemeier Hansson +# Copyright (c) 2004-2013 David Heinemeier Hansson # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index a3c0b2c6bd..9ba606c045 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -530,7 +530,7 @@ module ActionMailer # The resulting Mail::Message will have the following in its header: # # X-Special-Domain-Specific-Header: SecretValue - def headers(args=nil) + def headers(args = nil) if args @_message.headers(args) else @@ -660,7 +660,7 @@ module ActionMailer # format.html # end # - def mail(headers={}, &block) + def mail(headers = {}, &block) @_mail_was_called = true m = @_message diff --git a/actionmailer/lib/action_mailer/collector.rb b/actionmailer/lib/action_mailer/collector.rb index cbb2778fae..e8883a8235 100644 --- a/actionmailer/lib/action_mailer/collector.rb +++ b/actionmailer/lib/action_mailer/collector.rb @@ -20,7 +20,7 @@ module ActionMailer end alias :all :any - def custom(mime, options={}) + def custom(mime, options = {}) options.reverse_merge!(content_type: mime.to_s) @context.formats = [mime.to_sym] options[:body] = block_given? ? yield : @default_render.call diff --git a/actionmailer/lib/action_mailer/test_case.rb b/actionmailer/lib/action_mailer/test_case.rb index 80f323873d..207f949fe2 100644 --- a/actionmailer/lib/action_mailer/test_case.rb +++ b/actionmailer/lib/action_mailer/test_case.rb @@ -10,13 +10,6 @@ module ActionMailer end class TestCase < ActiveSupport::TestCase - - # Use AM::TestCase for the base class when describing a mailer - register_spec_type(self) do |desc| - Class === desc && desc < ActionMailer::Base - end - register_spec_type(/Mailer( ?Test)?\z/i, self) - module Behavior extend ActiveSupport::Concern diff --git a/actionmailer/lib/action_mailer/test_helper.rb b/actionmailer/lib/action_mailer/test_helper.rb index 3ab37d8142..6452bf616c 100644 --- a/actionmailer/lib/action_mailer/test_helper.rb +++ b/actionmailer/lib/action_mailer/test_helper.rb @@ -4,9 +4,9 @@ module ActionMailer # # def test_emails # assert_emails 0 - # ContactMailer.deliver_contact + # ContactMailer.welcome.deliver # assert_emails 1 - # ContactMailer.deliver_contact + # ContactMailer.welcome.deliver # assert_emails 2 # end # @@ -15,12 +15,12 @@ module ActionMailer # # def test_emails_again # assert_emails 1 do - # ContactMailer.deliver_contact + # ContactMailer.welcome.deliver # end # # assert_emails 2 do - # ContactMailer.deliver_contact - # ContactMailer.deliver_contact + # ContactMailer.welcome.deliver + # ContactMailer.welcome.deliver # end # end def assert_emails(number) @@ -38,7 +38,7 @@ module ActionMailer # # def test_emails # assert_no_emails - # ContactMailer.deliver_contact + # ContactMailer.welcome.deliver # assert_emails 1 # end # diff --git a/actionmailer/lib/rails/generators/mailer/USAGE b/actionmailer/lib/rails/generators/mailer/USAGE index 7470289fd3..323bb8a87f 100644 --- a/actionmailer/lib/rails/generators/mailer/USAGE +++ b/actionmailer/lib/rails/generators/mailer/USAGE @@ -10,9 +10,8 @@ Example: ======== rails generate mailer Notifications signup forgot_password invoice - creates a Notifications mailer class, views, test, and fixtures: + creates a Notifications mailer class, views, and test: Mailer: app/mailers/notifications.rb - Views: app/views/notifications/signup.erb [...] + Views: app/views/notifications/signup.text.erb [...] Test: test/mailers/notifications_test.rb - Fixtures: test/fixtures/notifications/signup [...] |