blob: ca4c69f91bd209c93e4871b3b5b02f1d81a99117 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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.perform_with_hooks("david")
assert_equal [ "rescued from StandardError", "performed beautifully" ], $BUFFER
end
end
|