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

Version Path
kt-delayed_paperclip-3.1.1 spec/integration/process_job_spec.rb
kt-delayed_paperclip-3.1.0 spec/integration/process_job_spec.rb
delayed_paperclip-3.0.1 spec/integration/process_job_spec.rb
delayed_paperclip-3.0.0 spec/integration/process_job_spec.rb