rails/rails — pull request #6525 by floehopper (2012-05-28 21:57:47+00:00)
Title: Exceptions like Interrupt & NoMemoryError should not be rescued in tests.

Neither Test::Unit nor MiniTest rescue exceptions like Interrupt or
NoMemoryError, but ActiveSupport::Testing::SetupAndTeardown#run which
overrides MiniTest::Unit::TestCase#run currently rescues them.

Rescuing an Interrupt exception is annoying, because it means when you
are running a lot of tests e.g. when running one of the rake test tasks,
you cannot break out using ctrl-C.

Rescuing exceptions like NoMemoryError is foolish, because the most
sensible thing to happen is for the process to terminate as soon as
possible.

This solution probably needs some finessing e.g. I'm not clear whether
the assumption is that only MiniTest is supported. Also early versions
of MiniTest did not have this behaviour. Finally the
ActiveSupport::Testing::Performance also suffers from the same
problem, but I have not fixed it here.

Integrating with Test::Unit & MiniTest has always been a pain. It would
be great if both of them provided sensible extension points for the kind
of things that both Rails and Mocha want to do, but in the meantime
hopefully this is of some help.