[rspec-users] spec-ing private methods?

Pat Maddox pat.maddox at gmail.com
Wed Oct 21 03:38:23 EDT 2009


Break your object up.  It's too big.

On Wed, Oct 14, 2009 at 12:36 PM, Joaquin Rivera Padron
<joahking at gmail.com> wrote:
> hello there,
> how do you tipically spec private methods? The thing is Ï have something
> like this:
>
> def some_method
>    complex_method + other_complex_methods
> end
>
> private
> def complex_method...
> def other_complex_methods ...
>
> and the two complex methods can get really tricky to get right, I would like
> to be able to write specs for them, how do you do that? I mean I cannot do:
>
> object.some_private_method
>
> am I?
>
> thanks in advance,
> joaquin
>
> --
> www.least-significant-bit.com
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list