ActiveJob run enqueued jobs without block for testing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|# this pulls out each job and runs it, then clears the job queue.|
|# helpful when you don't want to run inside a block.|
|enqueued_jobs = ActiveJob::Base.queue_adapter.enqueued_jobs|
|enqueued_jobs.each do |item||
|ActiveJob::Base.queue_adapter.performed_jobs << item|