spec/qe/testing_spec.rb in qe-0.3.1 vs spec/qe/testing_spec.rb in qe-0.3.2

- old
+ new

@@ -16,6 +16,20 @@ Qe::Testing.schedule(HelloWorker, date, a: 1) job = Qe.jobs.first expect(job).to include(run_at: date) end + + it "runs jobs" do + Qe::Testing.enqueue(HelloWorker, a: 1) + + instance = double.as_null_object + instance.should_receive(:perform) + + HelloWorker + .should_receive(:new) + .with(a: 1) + .and_return(instance) + + Qe.drain + end end