You can watch this episode by subscribing to Cocoacasts Plus.

Building a Weather Application From Scratch

Writing Unit Tests for the Day View Model

Stop Writing Swift That Sucks

DISCLAIMER: No Rocket Science Involved

Join 20,000+ Developers Learning About Swift Development

Download the 4 Swift Patterns I Swear By

Because a view model isn't or shouldn't be coupled to the user interface, it's easy to write unit tests for a view model. I'd like to illustrate that in this episode by writing a handful of unit tests for the DayViewModel struct. If you're new to unit testing, then this episode is an excellent start.

Instant and Unlimited Access
to 400+ Cocoacasts Tutorials


$19 / month

Pay Once a Month
Access to Community
30 Day Money Back Guarantee


$8.25 / month (billed annually)

Pay Once a Year and Save $129
Access to Community
30 Day Money Back Guarantee
Access to All Books

Next Episode "Implementing the Week View Model"