Testing in iOS - Part 9: Challenge: Write Red Green | Ray Wenderlich

Your challenge is to write another unit test but this time, adhering to the Red Green Refactor method.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/3530-testing-in-ios/lessons/9

Near the end of this video, why does one method say self.result, but the other says result?

@bryanmee It’s the same thing in this case, You can read more about self in Swift in our Swift style guide:

I hope it helps. Please let me know if you have any more questions or issues regarding all this. Thank you! :]

1 Like

In my case, I would make clear() a private method. Since I don’t want others to call it anytime they want.

However, I don’t currently have a way to do that while testing. How you might do it if you were in my shoes?

@bdmoakley Can you please help with this when you get a chance? Thank you - much appreciated! :]