jsternal/speceasy — pull request #1 by ronrat (2014-07-06 23:45:42+00:00)
Title: Do not mask exceptions thrown during the SUT action.

This change attempts to maintain the existing `AssertWasThrown` functionality and yet gives priority to exceptions that occur while acting on the SUT. If an exception is thrown during the `then` because of a failed assertion or otherwise, before allowing that exception to propogate, it will first make sure that either 1) there was no exception thrown during the action on the SUT or 2) that there was an assertion made on the exception.

When an exception occurs during assert phase *and*:

- No exception during action on SUT: assertion exception is always allowed to propagate.
- Exception during action on SUT and no assertion was made on the exception (`AssertWasThrown` was not called): the assertion exception is swallowed and the SUT exception (`thrownException`) will be thrown, thus causing the SUT exception to be reported.
- Exception thrown during action on SUT and an assertion was made on the exception (`AssertWasThrown` was called): assertion exception is allowed to propagate, as it is likely caused by a failed assertion on the exception.

This change causes the `RunSpecsForBrokenClass()` to pass. However, I'm not convinced that I've thought of all the possible scenarios.