This allows me to do something like this in tests:
Backburner.test_mode = :fake
do_something_that_enqueues_something
assert_not_nil Backburner.test_enqeueued_jobs_find_by_job("FooJob")
If you want the jobs to execute inline instantly instead of going to queue you can do
Backburner.test_mode = :inline
do_something_that_enqueues_something
#the job was executed like SomethingJob.perform(args)
#without going to the queue
That code could easily be extracted to a gem you require in test_helper.