From: patrick-may@... (Patrick May) Date: 2002-06-08T17:17:25+09:00 Subject: Re: [RDoc etc] automatic documentation: using tests in addition to / instead of comments Massimiliano Mirra wrote in message news:<20020607211650.GA6102@prism.localnet>... > See comments by Nat Price in [ruby-talk:22920] about meaningful test > names. Basically a test should be named in such a way that, when the > runner reports it as failing, one can get an idea of what is failing > by just peeking at the name, e.g. not just a single test_divide but > test_divide_raises_if_by_zero, > test_divide_returns_correct_result_with_nonzero, etc. I noticed that in my practice, test_method would often contain the best example code, while the edge cases would be in test_method_does_something. > Of course nobody aims guns if done otherwise :-), but through time > I've found that practice to really help. With an explicit directive, you could still pull these other bits in as examples. I noticed this naming pattern among the tests that made the best examples. I guess the question would be "does anyone else have this pattern?" ~ Patrick P.S. I had problems looking up [ruby-talk:22920] http://www.ruby-talk.com/cgi-bin/scat.rb/ruby/ruby-talk/22920 seems to point to [ruby-talk:23457] ?