From: Mathieu Bouchard Date: 2006-01-13T17:19:41+09:00 Subject: Re: Design contracts and refactoring (was Re: mathn: ugly warnings) On Fri, 13 Jan 2006, James Britt wrote: > ara.t.howard@noaa.gov wrote: > > On Fri, 13 Jan 2006, James Britt wrote: > > > But what will the user see from ri and rdoc? > > nothing. i've found myself using them less and less - at this point i use > > them about once per month. my feeling is that > > vi -o samples/* > > is much more powerful. > For a certain subset of Ruby developers. > ... In order to entrench the tests-as-documentation habit firmly in the Ruby community, we need a catchy acronym. Like RTFUT = Read the Fabulous Unit Tests! > Oh, I agree. I want to see more examples and tests included as well, > but there needs to be some form of easily-accessible doc set to > accompany with binary-only Ruby packages (e.g., the Windows "1-click"). Is there a way for code to get automatically included by rdoc and counted as doc without having it in two places in the source code? I mean code that would get run when loading a library. That way, doing "ri MyStuff" could display the contract for MyStuff, supposing that it's in the same file as the implementation. However I suppose that doing it for unit-tests (that are presumably in a separate file) isn't supported... yet. _ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - t�l:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montr�al QC Canada