3 ms·
Nice post! Are you always testing Apple's implementation details in your TDD? To me it seems the actual notification submission shouldn't be tested, only that i
by pothibo 13y ago
Nice post! Are you always testing Apple's implementation details in your TDD? To me it seems the actual notification submission shouldn't be tested, only that it was called with the proper value?
Just a heads up though: The code snippet were hard to read because of the indentation. May I suggest
cleanupObj = [[NSNotificationCenter defaultCenter]
addObserverForName:notificationName
object:nil
queue:nil
usingBlock:^(NSNotification *note) {
// Code!
}];
It might not be your coding style but in very narrow container, it makes it easier to read ;)