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
Your challenge is to write another unit test but this time, adhering to the Red Green Refactor method.
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! :]
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! :]