From: Kyle Schmitt Date: 2007-03-28T05:37:58+09:00 Subject: Re: temporarily change method access for test Private methods? Hum. Never saw a use for them in my stuff.. anyway http://www.rubycentral.com/faq/rubyfaq-7.html and http://www.rubycentral.com/faq/rubyfaq-8.html will tell you. But something like this will work class J def ack() puts "be nimble" end def ill() puts "went up the hill" end private :ack end j=J.new j.ill went up the hill j.ack NoMethodError: private method `ack' called for # class < wrote: > Hi All, > > I have seen an example of a unit test temporarily making a private method > public to unit test it. Now that I need it I can't find it :-) Please could > someone kindly point me in the right direction? > > Many Thanks > > -- > pdtct > > > >