diff options
Diffstat (limited to 'activejob')
-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 1cd2c40c15..43417b8a12 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 + yield if block_given? 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] } |