class RSpec::Rails::Matchers::ActiveJob::HaveEnqueuedJob
def matches?(proc)
def matches?(proc) raise ArgumentError, "have_enqueued_job and enqueue_job only support block expectations" unless Proc === proc original_enqueued_jobs = Set.new(queue_adapter.enqueued_jobs) proc.call enqueued_jobs = Set.new(queue_adapter.enqueued_jobs) check(enqueued_jobs - original_enqueued_jobs) end