aboutsummaryrefslogblamecommitdiffstats
path: root/test/cases/rescue_test.rb
blob: a91ed01f45c16f3c91449b29f377ce01ced8b37e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                  
                        


                                                                                   
require 'helper'
require 'jobs/rescue_job'

require 'active_support/core_ext/object/inclusion'

class RescueTest < ActiveSupport::TestCase
  setup do
    $BUFFER = []
  end
  
  test 'rescue perform exception with retry' do
    job = RescueJob.new
    job.execute("david")
    assert_equal [ "rescued from StandardError", "performed beautifully" ], $BUFFER
  end
end