Sha256: eaead4378b00860e7a71226c0906b3880c7e87cbb86620f3bc3e05105fae3f84
Contents?: true
Size: 609 Bytes
Versions: 4
Compression:
Stored size: 609 Bytes
Contents
require "spec_helper" RSpec.describe "DelayedJob::ProcessJob" do before :each do ActiveJob::Base.queue_adapter = :test ActiveJob::Base.logger = nil end let(:dummy) { Dummy.new(:image => File.open("#{ROOT}/fixtures/12k.png")) } describe "integration tests" do include_examples "base usage" end def process_jobs ActiveJob::Base.queue_adapter.enqueued_jobs.each do |job| job[:job].send(:perform_now, *job[:args]) end end def jobs_count(queue = "paperclip") ActiveJob::Base.queue_adapter.enqueued_jobs.count do |job| job[:queue] == queue end end end
Version data entries
4 entries across 4 versions & 2 rubygems