aboutsummaryrefslogtreecommitdiffstats
path: root/test/cases/rescue_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/cases/rescue_test.rb')
-rw-r--r--test/cases/rescue_test.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/cases/rescue_test.rb b/test/cases/rescue_test.rb
index aea8b036d4..0e995405f7 100644
--- a/test/cases/rescue_test.rb
+++ b/test/cases/rescue_test.rb
@@ -7,17 +7,15 @@ class RescueTest < ActiveSupport::TestCase
setup do
$BUFFER = []
end
-
+
test 'rescue perform exception with retry' do
- job = RescueJob.new
- job.execute("david")
+ RescueJob.enqueue("david")
assert_equal [ "rescued from ArgumentError", "performed beautifully" ], $BUFFER
end
test 'let through unhandled perform exception' do
- job = RescueJob.new
assert_raises(RescueJob::OtherError) do
- job.execute("other")
+ RescueJob.enqueue("other")
end
end
end