Just been watching Sandi Metz’s Magic Tricks of Testing, which I know you guys also enjoy.
I’m wondering if in the Extract Class video we should be testing the implementation of
recipients method, which is also a private method @benorenstein, @jferris ?
According to Sandi’s recommendations, you should expect to send outgoing messages - so I was thinking you would have a simple expectation such as
in order to test the behavior or implementation rather than state, which is handled over in the
Parser class directly? Is it enough to mock the implementation by creating a double and stubbing the recipients method, knowing that it will get called when exercising the
I’m just curious regarding this point, because I have the same issue with the exercise - where I’m collaborating with another object in a private method. I’m a bit confused since I’m not testing private methods, but feel like I should be testing these types of outgoing messages to check they’re being sent?