I have some unit tests that check that saving a managed object subclass with missing required properties fail appropriately. In Swift 1.2, I could do that as follows:
XCTAssertFalse(context.save())
What is the appropriate way to test the same thing in Swift 2? This works:
do {
try context.save()
} catch {
XCTAssertTrue(true) // or something similar
}
but there must be a better way.