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 /activejob | |
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 'activejob')
-rw-r--r-- | activejob/lib/active_job/railtie.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activejob/lib/active_job/railtie.rb b/activejob/lib/active_job/railtie.rb index d0294854d3..ecc0908d5f 100644 --- a/activejob/lib/active_job/railtie.rb +++ b/activejob/lib/active_job/railtie.rb @@ -30,6 +30,10 @@ module ActiveJob send(k, v) if respond_to? k end end + + ActiveSupport.on_load(:action_dispatch_integration_test) do + include ActiveJob::TestHelper + end end initializer "active_job.set_reloader_hook" do |app| |