lib/sidekiq/testing.rb in sidekiq-0.11.1 vs lib/sidekiq/testing.rb in sidekiq-0.11.2
- old
+ new
@@ -17,9 +17,13 @@
# assert_equal 0, HardWorker.jobs.size
# HardWorker.perform_async(:something)
# assert_equal 1, HardWorker.jobs.size
# assert_equal :something, HardWorker.jobs[0]['args'][0]
#
+ # assert_equal 0, Sidekiq::Extensions::DelayedMailer.jobs.size
+ # MyMailer.delayed.send_welcome_email('foo@example.com')
+ # assert_equal 1, Sidekiq::Extensions::DelayedMailer.jobs.size
+ #
module ClassMethods
alias_method :perform_async_old, :perform_async
def perform_async(*args)
jobs << { 'class' => self.name, 'args' => args }
true