startup or bust | because the nine to five simply won't do
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?

JOIN THE DISCUSSION






Have something to say? Feel free to let everyone know by adding your two cents.

CONTACT

Feel free to get in touch with me to talk about just anything; it'd be great to hear from you! Click here to get in touch.

Current Project

Houdini Mechanical Turk API: Easily integrate human labor into any app.