rails--rails/actionmailer/test
Jeremy Daer e35b98e6f5
Action Mailer: Declarative exception handling with `rescue_from`.
Follows the same pattern as controllers and jobs. Exceptions raised in
delivery jobs (enqueued by `#deliver_later`) are also delegated to the
mailer's rescue_from handlers, so you can handle the DeserializationError
raised by delivery jobs:

```ruby
class MyMailer < ApplicationMailer
  rescue_from ActiveJob::DeserializationError do
    …
  end
```

ActiveSupport::Rescuable polish:
* Add the `rescue_with_handler` class method so exceptions may be
  handled at the class level without requiring an instance.
* Rationalize `exception.cause` handling. If no handler matches the
  exception, fall back to the handler that matches its cause.
* Handle exceptions raised elsewhere. Pass `object: …` to execute
  the `rescue_from` handler (e.g. a method call or a block to
  instance_exec) against a different object. Defaults to `self`.
2016-05-15 18:44:16 -07:00
..
fixtures Expand on Action Mailer Fragment caching tests 2016-04-17 23:16:09 +05:30
mailers Action Mailer: Declarative exception handling with `rescue_from`. 2016-05-15 18:44:16 -07:00
abstract_unit.rb
assert_select_email_test.rb
asset_host_test.rb
base_test.rb
caching_test.rb Expand on Action Mailer Fragment caching tests 2016-04-17 23:16:09 +05:30
delivery_methods_test.rb Sendmail default arguments match Mail::SendMail 2016-04-05 14:11:37 -05:00
i18n_with_controller_test.rb Suppress warnings 2016-03-31 01:07:43 +09:00
log_subscriber_test.rb
mail_helper_test.rb
mail_layout_test.rb
message_delivery_test.rb Action Mailer: Declarative exception handling with `rescue_from`. 2016-05-15 18:44:16 -07:00
test_case_test.rb Clear ActionMailer deliveries on setup and teardown 2016-04-25 22:41:18 -05:00
test_helper_test.rb
url_test.rb Suppress warnings 2016-03-31 01:07:43 +09:00