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
One way I've done it in the past is:
class foo def public_method private_method end private unless 'test' == Rails.env def private_method 'private' end end