We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56209f8 commit f1a66d8Copy full SHA for f1a66d8
spec/concurrent/future_spec.rb
@@ -209,6 +209,11 @@ def trigger_observable(observable)
209
expect(future.value).to be_nil
210
end
211
212
+ it 'sets the reason to the Exception instance when the handler raises Exception' do
213
+ future = Future.new(executor: executor){ raise Exception }.execute
214
+ expect(future.reason).to be_a(Exception)
215
+ end
216
+
217
it 'sets the state to :rejected when the handler raises an exception' do
218
future = Future.new(executor: executor){ raise StandardError }.execute
219
expect(future).to be_rejected
0 commit comments