OpenHack Pittsburgh: a great place to share and learn
Jan 27, 2014 · 1 minute read · CommentsOpenHackPittsburghtestingunit testingaccess control
Another month, another meeting of OpenHack Pittsburgh!
The project I worked on was writing a blog post on the controversial subject of unit testing private methods. I ended up not finishing the post, not only because there’s a lot to say, but also because I got sidetracked (in a good way) because of discussions with people while at OpenHack!
There were many good points that were made and so I had to reconsider some of my arguments. My overall viewpoint is still that the distinction between “public” and “private” is fluid, and that anything that seems significant enough that it feels like it should be tested should in fact be tested, ignoring the artifacts of how it is currently classified. One of the main counterpoints was that if you need to test it, then it should be factored out and made its own unit so that in essence, the rule against testing the private is maintained.
Anyway, I will put up my post once I actually collect all my thoughts together and finish it.