Sha256: 9d3e3d9d288069ee1058c9ff4a5693d2b9acacf39a7bf83f1d508c64b2d808d3
Contents?: true
Size: 585 Bytes
Versions: 3
Compression:
Stored size: 585 Bytes
Contents
require "spec_helper" class TestJob < Que::Job def run(a, b) a * b end end describe Que::Testing do after { TestJob.jobs.clear } it "stashes calls" do TestJob.jobs.count.must_equal 0 TestJob.enqueue 1, 2 TestJob.jobs.count.must_equal 1 TestJob.jobs.first['args'].must_equal [1,2] TestJob.jobs.first.job_class.must_equal "TestJob" time = Time.now TestJob.enqueue 1, 2, run_at: time TestJob.jobs.last.run_at.must_equal time end it "responds empty for non-insert commands" do stats = Que.job_stats stats.must_be_empty end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
que-testing-0.2.0 | spec/testing_spec.rb |
que-testing-0.1.1 | spec/testing_spec.rb |
que-testing-0.1.0 | spec/testing_spec.rb |