

Why A Unicorn Dies Every Time You Test A Private Method - alkaloids
http://www.superpumpup.com/unicorn-dies

======
bittired
Access modifiers provide limited access control that should not be depended
on. They are there to indicate what is in no way contractually agreed to
retain the same implementation between versions of that code. So, test what
you want, but testing private methods is a lot more brittle that writing a
test for a public method and is just going to piss someone off.

btw- Unicorns are pretty popular in Ruby
([http://unicorn.bogomips.org/](http://unicorn.bogomips.org/)). People must
not be writing a lot of tests for private methods, because there aren't many
dying. :)

