Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Allow `perform_enqueued_jobs` to be called without a block. #33626
Performs all of the jobs that have been enqueued up to this point in the test.
Allows you to test code that is in some intermediate state between the time that the job is enqueued to the time that the job is performed. For example in my case, when uploading an image asynchronously a default image is set until the thumbnails have been processed in the background. This allows me to test that after the job is enqueued the default image is set, then call
Example: ``` def test_assert_performed_with MyJob.perform_later(1,2,3) perform_enqueued_jobs assert_performed_with(job: MyJob, args: [1,2,3], queue: 'high') end ``` Follow up rails#33626.