Dave Thomas <Dave / PragmaticProgrammer.com> wrote in message news:<m23cwndl8g.fsf / zip.local.thomases.com>...
> In (say) Java, people tend to keep the unit tests in separate files. I
> think this is for two reasons. First the tests add bulk to the class
> files. Second, the additional verbiage in Java means the tests obscure
> the meaning of the code.

The second reason does apply to Ruby, just less drastically.

I have a third reason, that applies to ruby:

It makes it a bit easier for me to move around big areas of code
knowing that I'm not changing any tests.  I feel that separating the
two reduces dependencies b/w the structure of the tests and the
structure of the code.

I don't mind breaking tests b/c of an api change; I'm just afraid of
losing tests when I play with the source.

~ Patrick