Colin Putney <colin / whistler.com> writes:

> But I think we ought to be careful about the conventions we establish
> for making it possible. One of the things I like about Ruby is that it
> tends *not* to rely on conventions; most things are explicit. An
> example relevant to the subject at hand would be code organization. I
> can organize my code however I like: one class per file, multiple
> classes per file, multiple files per class, whatever makes sense for
> maximum clarity in that particular project.
> 
> I'd like to keep the same freedom in organizing test cases,
> particularly since "clarity" is in the mind of the comprehender, and
> can vary from project to project.
> 
> So my suggestion would be to establish a convention that explicitly
> states where the test cases for a given (part of a) class are,
> perhaps in a specially formatted comment.

I think is this a consistent message we're seeing in this thread, and
one I'm coming to agree with. So, I'm thinking that I'll see if it's
possible to hae the best of both worlds:

1. A convention which, if followed, allows RDoc to find the tests
   automatically.

2. A directive that explicitly links tests to methods.

3. Command line options to allow the test source to be inlined or made
   available via popups of some kind.


I'm also quite taken with the documentation in Jelly, which has

  #  example:
  #     a = Tag.new
  #     a.id = 123
  #     ...

And I think I'd like to be able to integrate this kind of code with
the test cases.

There are quite a few threads coming together here (including the
ability to have explicit tags, todo lists and so on). I suspect I'm
going to have to out together some kind of roadmap before I go too
much further :)


Thanks to everyone for all the interesting discussion on this thread.


Dave