class RSpec::Rails::Matchers::ActiveJob::HaveEnqueuedJob

@private

def does_not_match?(proc)

def does_not_match?(proc)
  set_expected_number(:at_least, 1)
  !matches?(proc)
end

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 = Set.new(queue_adapter.enqueued_jobs)
  proc.call
  enqueued_jobs = Set.new(queue_adapter.enqueued_jobs)
  check(enqueued_jobs - original_enqueued_jobs)
end