D
Daniel Berger
Hi all,
Ruby 1.8.6
I'm trying to do write some basic tests for Thread#raise.
Unfortunately, because of the way Test::Unit implements assert_raise
(I think) I can't actually verify that Thread#raise actually works.
For example:
# Assume @thread created in setup
assert_raise(FooError){ @thread.raise(FooError) }
The above test won't work - no error is raised. Any suggestions on how
I should approach this?
Also, if anyone has any idea how to test that threads abort properly
with Thread.abort_on_exception = true, I'm all ears.
Thanks,
Dan
Ruby 1.8.6
I'm trying to do write some basic tests for Thread#raise.
Unfortunately, because of the way Test::Unit implements assert_raise
(I think) I can't actually verify that Thread#raise actually works.
For example:
# Assume @thread created in setup
assert_raise(FooError){ @thread.raise(FooError) }
The above test won't work - no error is raised. Any suggestions on how
I should approach this?
Also, if anyone has any idea how to test that threads abort properly
with Thread.abort_on_exception = true, I'm all ears.
Thanks,
Dan