[rspec-users] private methode

Pat Maddox pergesu at gmail.com
Fri Oct 10 16:12:57 EDT 2008

Anita Anita <lists at ruby-forum.com> writes:

> Hi,
> Can I test private methods directly?
> Or should I pass by the methods that are calling these private methods?
> Or can I make the method private after testing?
> What is the best way?
> Thank you

The party line is not to test private methods.  Either test them
indirectly via a public method, or extract it to a separate object and
make it public there.


More information about the rspec-users mailing list