Flowdock
method

jobs_with

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: TestHelper
jobs_with(jobs, only: nil, except: nil, queue: nil) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activejob/lib/active_job/test_helper.rb, line 588
      def jobs_with(jobs, only: nil, except: nil, queue: nil)
        validate_option(only: only, except: except)

        jobs.count do |job|
          job_class = job.fetch(:job)

          if only
            next false unless filter_as_proc(only).call(job)
          elsif except
            next false if filter_as_proc(except).call(job)
          end

          if queue
            next false unless queue.to_s == job.fetch(:queue, job_class.queue_name)
          end

          yield job if block_given?

          true
        end
      end
Register or log in to add new notes.