diff options
author | Ricardo Díaz <ricardotk002@gmail.com> | 2018-09-11 19:38:55 -0500 |
---|---|---|
committer | Ricardo Díaz <ricardotk002@gmail.com> | 2018-09-12 16:58:14 -0500 |
commit | 64a9759aff949761f1d79b010e4817a91f3ee226 (patch) | |
tree | 69c1e85183175ab43dabdb304fa9c9d420075efa /actionmailer/lib | |
parent | 9e2460393524556ac3aae7e84a0b077055ec1b4d (diff) | |
download | rails-64a9759aff949761f1d79b010e4817a91f3ee226.tar.gz rails-64a9759aff949761f1d79b010e4817a91f3ee226.tar.bz2 rails-64a9759aff949761f1d79b010e4817a91f3ee226.zip |
Include test helpers when ActionDispatch::IntegrationTest is loaded
As @dhh brings up, the point of `ActionDispatch::IntegrationTest` is to
allow users to test the integration of all the pieces called by a
controller. Asserting about the emails and jobs queued is part of that
task.
This commit includes the `ActionMailer::TestHelper` and
`ActiveJob::TestHelper` modules when the ActionMailer and ActiveJob
railties are initialized respectively.
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/railtie.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index 69578471b0..bb6141b406 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -49,7 +49,10 @@ module ActionMailer options.each { |k, v| send("#{k}=", v) } end - ActiveSupport.on_load(:action_dispatch_integration_test) { include ActionMailer::TestCase::ClearTestDeliveries } + ActiveSupport.on_load(:action_dispatch_integration_test) do + include ActionMailer::TestHelper + include ActionMailer::TestCase::ClearTestDeliveries + end end initializer "action_mailer.compile_config_methods" do |