I am writing a test test with rspec, and after the action is completed, my job is to send an email to admin. But I would like to disable this work for my tests or somehow make fun of it. How can i do this?
I use delayed_job_active_record + daemons gems.
class AdminNotificationJob < 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
source share