March 2018
This month we discussed unit testing. Testing is a great way to ensure your app will behave correctly and will also help you write better code.
The challenge this month is to update the Nashville Za application to be more testable.
Update the tests on milesString
to be more clear.
Hint: You will likely need to update the milesString
computed property extension on CLLocationDistance
to make it more simple to test. It might even make sense to relocate the code that returns the miles string.
Improve the code that pulls in the JSON data and write tests to ensure the data is being decoded properly.
Note: For more information on Codable
see Blake Merryman's talk from last month about Codable
.
- Open a PR with your solution in a folder with your name (e.g.
/blakemerryman
) at the root level.