From: Brian Candler Date: 2003-07-06T05:58:49+09:00 Subject: Re: Test order in Test::Unit On Sun, Jul 06, 2003 at 02:05:57AM +0900, Nathaniel Talbott wrote: > > - Does Test::Unit have any method to test private methods? > > Have you tried using Object#send? It completely bypasses all access > protection. instance_eval is also extremely useful; it lets you get at instance variables without accessors, as well as private methods. class Foo private def foo puts "Got it" end end a = Foo.new a.foo #=> NameError: private method `foo' called a.instance_eval { foo } #=> "Got it"