January 26, 2011
Cucumber Tests with Delayed Jobs
Here’s a little step I use when testing scenarios that involve background jobs:
When /^delayed_job runs all pending jobs$/ do Delayed::Job.all.map{|j| j.payload_object.perform} end
Is there a better way? For example, can you disable Delayed Job in certain environments?
Have something to say? Feel free to let everyone know by adding your two cents.