Sha256: 1fd250018d0b7cfaf80b365fb37b24c8eb5a02f9b7330ab03fd9a846932d26da
Contents?: true
Size: 593 Bytes
Versions: 4
Compression:
Stored size: 593 Bytes
Contents
require "spec_helper" describe Qe::Immediate do let(:job) { double("job").as_null_object } it "sets options" do HelloWorker .should_receive(:new) .with(:a => 1) .and_return(job) Qe::Immediate.enqueue(HelloWorker, :a => 1) end it "performs job" do HelloWorker.stub :new => job job.should_receive(:perform) Qe::Immediate.enqueue(HelloWorker) end it "schedules job" do date = Time.now Qe::Immediate .should_receive(:enqueue) .with(HelloWorker, :a => 1) Qe::Immediate.schedule(HelloWorker, date, :a => 1) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
qe-0.3.4 | spec/qe/immediate_spec.rb |
qe-0.3.3 | spec/qe/immediate_spec.rb |
qe-0.3.2 | spec/qe/immediate_spec.rb |
qe-0.3.1 | spec/qe/immediate_spec.rb |