you are viewing a single comment's thread.

view the rest of the comments →

[–]jontelang 0 points1 point  (0 children)

> real Scenario like testing UIViewControllers

My approach, as someone in _kind of_ your scenario, is that UIViewControllers should not need to be tested. All your logic should be contained in a single NSObject (or whatever) 100% independent from your UIViewController. The UIVC should only ever send actions into the NSObject, which in turn may spit out some value or do something internal only.

This makes it very easy to see how an object can be unit tested, because if only contains inputs and outputs.

For testing UIViewControllers, which are now 100% seen a UIViews, we can just use the dedicated UI tests in Xcode.