Inverted XCTestExpectations
But what about asserting a notification isn’t sent? Waiting for an expectation that’s not fulfilled will always result in an error… So I started browsing the headers of XCTest and I came across
isInverted
property onXCTestExpectation
.
Update (2019-02-26): Heath Borders:
I created an extension with that as an initializer because property-based injection means that you don’t get warnings about unused local variables.