6 ms·
Very cool solution! I've also seen claims that the private methods of modules should not be tested, since they don't represent the public interface of the modu
by kevin1024 12y ago
Very cool solution! I've also seen claims that the private methods of modules should not be tested, since they don't represent the public interface of the module and refactorings are likely to change the private methods. If the private methods are complicated enough to warrant testing on their own, ideally they should be extracted into their own module. Not sure if I agree but it's something to think about!
- jonahkagan 12y agoWhat if the private methods are complex but also module-specific? For instance, if they deal with a data type that is private to the module? When you pull out complex code like this into another module, how do you specify that the new module is actually private to the old module?
- deleted 12y ago[deleted]
- jonahkagan 12y ago(They are very good points though! Thanks for sharing them)
- gaelow 12y ago"Private methods of modules should not be tested, since they don't represent the public interface of the module and refactorings are likely to change the private methods" +1 to that.