diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-06-28 15:08:01 +0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-06-28 15:08:01 +0200 |
commit | 03fd2f38103b8e22dc75c5e4769f9f90bf0cf3d1 (patch) | |
tree | f9b2cd748fbe3cb87821b929c0f8efe0fcf8a2b9 /activejob/lib | |
parent | 08dde0f355e0450bc2cb7e0b4b95a0ec18d1a870 (diff) | |
download | rails-03fd2f38103b8e22dc75c5e4769f9f90bf0cf3d1.tar.gz rails-03fd2f38103b8e22dc75c5e4769f9f90bf0cf3d1.tar.bz2 rails-03fd2f38103b8e22dc75c5e4769f9f90bf0cf3d1.zip |
Revert "Merge pull request #33243 from evopark/fix/action-mailer-test-helper-no-block"
This reverts commit 9d6bbf4e0b2d2b2e2fccd87a778de2893bb28a25, reversing
changes made to 5a1ea09062eaed78e21253a128d433a1beb745ad.
This method only works with block.
Diffstat (limited to 'activejob/lib')
-rw-r--r-- | activejob/lib/active_job/test_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activejob/lib/active_job/test_helper.rb b/activejob/lib/active_job/test_helper.rb index 43417b8a12..1cd2c40c15 100644 --- a/activejob/lib/active_job/test_helper.rb +++ b/activejob/lib/active_job/test_helper.rb @@ -301,7 +301,7 @@ module ActiveJob original_enqueued_jobs_count = enqueued_jobs.count expected = { job: job, args: args, at: at, queue: queue }.compact serialized_args = serialize_args_for_assertion(expected) - yield if block_given? + yield in_block_jobs = enqueued_jobs.drop(original_enqueued_jobs_count) matching_job = in_block_jobs.find do |in_block_job| serialized_args.all? { |key, value| value == in_block_job[key] } |