Sha256: 056d9b81b6b25ada3ff28fa003722eca7e2c83a77bd256cb8cb4b45d9b85c776
Contents?: true
Size: 805 Bytes
Versions: 2
Compression:
Stored size: 805 Bytes
Contents
require 'spec_helper' require 'sidekiq/api' describe "ActiveJob with Sidekiq backend" do if defined? ActiveJob before :all do DelayedPaperclip.options[:background_job_class] = DelayedPaperclip::Jobs::ActiveJob ActiveJob::Base.logger = nil ActiveJob::Base.queue_adapter = :sidekiq end let(:dummy) { Dummy.new(:image => File.open("#{ROOT}/spec/fixtures/12k.png")) } describe "integration tests" do include_examples "base usage" end end def process_jobs Sidekiq::Queue.new(:paperclip).each do |job| worker = job.klass.constantize.new args = job.args begin worker.perform(*args) rescue # Assume sidekiq handle exception properly end job.delete end end def jobs_count Sidekiq::Queue.new(:paperclip).size end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
delayed_paperclip-2.9.1 | spec/integration/active_job_sidekiq_spec.rb |
delayed_paperclip-2.9.0 | spec/integration/active_job_sidekiq_spec.rb |