spec/process/life_cycle_examples.rb in asynchronic-1.6.0 vs spec/process/life_cycle_examples.rb in asynchronic-1.6.1
- old
+ new
@@ -688,6 +688,24 @@
process.must_be_aborted
process.get(:key).must_equal 2
queue.must_be_empty
end
+ it 'Before finalize raises exception and aborts' do
+ process = create BeforeFinalizeRaisesExceptionJob
+
+ process.must_be_initialized
+ queue.must_be_empty
+
+ process.enqueue
+
+ process.must_be_queued
+ queue.must_enqueued process
+
+ execute queue
+
+ process.must_be_aborted
+ process.real_error.must_equal 'Before finalize exception'
+ queue.must_be_empty
+ end
+
end
\ No newline at end of file