From: Ryan Davis Date: 2010-04-07T09:42:43+09:00 Subject: Re: Visibility in tests On Apr 6, 2010, at 17:26 , Bernhard Brodowsky wrote: > I don't know how to apply unit tests to private methods. Usually, I only > use very few private methods and for my small private purposes, it was > okay to just set those few to public, too, but how do you do that in a > good way, if you really do have good reasons for making the methods > private? easy! make them public! Either don't make them private in the first place (my preference) or make them public in your tests (second choice... usually when I'm working with inherited code): class X public :previously_private_method end class TestX < MiniTest::Unit::TestCase def test_previously_private_method ... end end