Re: [rspec-users] private methode

2008-10-10 Thread Matt Wynne
On 10 Oct 2008, at 21:18, Anita Anita wrote: but I can't make it public. Why not? Who are you afraid is going to call it that shouldn't? ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] private methode

2008-10-10 Thread Anita Anita
Well, it's a methods for buying with credit card info and everything. So I wanted to test it to make sure that all my code works but I can't make it public. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.

Re: [rspec-users] private methode

2008-10-10 Thread Pat Maddox
Anita Anita <[EMAIL PROTECTED]> 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.

Re: [rspec-users] private methode

2008-10-10 Thread Yi Wen
IMHO, one should never directly test a private method. So I prefer the second way you mentioned in your email. Better yet, think of why you want to test a private method. Is it too complicated? If this is the case, way too often this private method should not really belong to the class it's curren

[rspec-users] private methode

2008-10-10 Thread Anita Anita
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 -- Posted via http://www.ruby-forum.com/. ___ rspec-users m