What\'s the best way to unit test protected and private methods in Ruby, using the standard Ruby Test::Unit framework?
Test::Unit
I\'m sure somebody will pipe up a
You can "reopen" the class and provide a new method that delegates to the private one:
class Foo private def bar; puts "Oi! how did you reach me??"; end end # and then class Foo def ah_hah; bar; end end # then Foo.new.ah_hah