On Tue, Apr 17, 2001 at 02:45:08AM +0900, Dave Thomas wrote:
> What do you gain by abandoning this limited form of safety? (type
> checking)
> 
> <snip>
> 
> We gain substantial testability. You can construct mock objects very,
> very easily, and test out code with far less overhead. You can test
> objects before the classes they rely on are finished (or even
> started). This ability to test partial classes also lends itself to
> easier incremental testing.

I'm curious about this.  Coming from a mainly C/C++/Perl background, it
isn't obvious to me how this benefit of "easy testability" is actually
realized.  I've been basically coding in Ruby just like I'd code in Perl
(except using classes all over the place).  But my write/test habits
haven't changed.

What kinds of things can I do to make my Ruby code easier to test?

-- 
matt