does the persistentStore delete when we making coreDataStack = nil in tearDown(). If we will run 2 or 3 tests simultaneously does persistentStore delete when we making coreDataStack = nil or it deleting because NSInMemoryStoreType. If it deletes because NSInMemoryStoreType is it true that app is reloading between tests? Then why do we coreDataStack = nil? is it coreDataStack making nil real necessary?
@astralbodies Do you have any feedback on this? Thank you - much appreciated! :]
Hiya @simons1994! The idea behind destroying the CoreDataStack in tearDown() is to just be explicit that each instance of the stack is used for exactly one test. The best tests are atomic and repeatable so holding onto an instance of a CoreDataStack to use with multiple tests isn’t ideal and can give unexpected results. It’s a good unit testing pattern to destroy anything you create in the setUp method.
thank you very much!
This topic was automatically closed after 166 days. New replies are no longer allowed.