Nimble: Any way to test that fatalError() is called?
I’m testing failure cases in my code, and it doesn’t look like Nimble provides a way to assert that a given block will call fatalError(). Is that correct? If so, it seems that would be a useful thing to have.
This Stack Overflow question has a couple of answers that might provide solutions: http://stackoverflow.com/questions/32873212/unit-test-fatalerror-in-swift
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 16 (14 by maintainers)
Commits related to this issue
- Added throwAssertion() matcher, which uses @mattgallagher's CwlPreconditionTesting framework (Issue #234) — committed to abbeycode/Nimble by abbeycode 8 years ago
- Added throwAssertion() matcher, which uses @mattgallagher's CwlPreconditionTesting framework (Issue #234) — committed to Megal/Nimble by abbeycode 8 years ago
I thought I had something…
I made a pull request to implement this, when someone has a chance to take a look! I’ve got some issues and questions.