Closed joemasilotti closed 9 years ago
Have you considered using NSAssertionHandler? when registered, it will have an opportunity to receive the assertion failure and trigger a spec failure.
On second thought, this is what is being done in similar situations elsewhere, so your PR helps us be consistent. We can look at assertion handlers later.
thx
Running UIKit specs logs out assertion failures due to the tests hitting code paths that expectedly fail assertions. Using an NSException achieves the same desired behavior but without the logging noise.
I only changed this one example because the tests trigger this code path. Other
NSAssert
s in the codebase are not triggered via spec so do not need to be changed.