Module: Sidekiq::TestingExtensions

Defined in:
lib/sidekiq/testing.rb

Instance Method Summary collapse

Instance Method Details

#jobs_for(klass) ⇒ Object



323
324
325
326
327
328
# File 'lib/sidekiq/testing.rb', line 323

def jobs_for(klass)
  jobs.select do |job|
    marshalled = job["args"][0]
    marshalled.index(klass.to_s) && YAML.safe_load(marshalled)[0] == klass
  end
end