Thursday, February 21, 2019 [Tweets] [Favorites]

Inverted XCTestExpectations

Paulo Andrade:

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 on XCTestExpectation.

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.


Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment