class RSpec::Rails::Matchers::ActiveJob::HaveEnqueuedJob
@private
def initialize(job)
def initialize(job) super() @job = job end
def matches?(proc)
def matches?(proc) raise ArgumentError, "have_enqueued_job and enqueue_job only support block expectations" unless Proc === proc original_enqueued_jobs_count = queue_adapter.enqueued_jobs.count proc.call in_block_jobs = queue_adapter.enqueued_jobs.drop(original_enqueued_jobs_count) check(in_block_jobs) end