From: David Vallner Date: 2006-02-11T04:47:14+09:00 Subject: Re: how to test a ruby class Dňa Piatok 10 Február 2006 20:08 doug.baker@ficoh.com napísal: > > Hi: I just installed Ruby and have FreeRIDE open. In Ruby, is there a > > method comparable to the "main" method in java that will run the class > > for testing? > > I would like to run my class from the IDE. > > > > Thanks, > > Doug > My two cents follow: I can't stand the very sight of people making a script or class executable for the sake of testing - main() methods and the like are supposed to execute a standalone program, and that's that. If you want to test, then do it properly, create a separate hierarchy of files with unit tests. It's just as easy, if not easier to write, and you don't clutter your business logic with test code. David Vallner