title: Disable ruby on rails job for test
body: <p>I'm writing controller test with rspec and after action completed, my job supposed to send email to the admin user. But I'd like to disable this job for my tests or mock it somehow. How can I do this?</p>
  
  <p>I'm using <a href="https://github.com/collectiveidea/delayed_job_active_record" rel="noreferrer"><code>delayed_job_active_record</code></a> + <a href="https://github.com/thuehlinger/daemons" rel="noreferrer"><code>daemons</code></a> gems.</p>
  
  <pre><code>class AdminNotificationJob &lt; ActiveJob::Base
    queue_as :default
  
    def perform(method, parameter)
      User.admin.includes(:profile).each do |admin|
        AdminMailer.send(method, admin, parameter).deliver_later
      end
    end
  end
  </code></pre>