From: Phlip Date: 2007-11-15T13:35:02+09:00 Subject: Re: test/unit question. Accessing class variables? weathercoach wrote: > This is my first attempt in trying to use the ruby library test/ > unit. Additionally my programming and ruby skills are still around > the beginner stage. > I have a unix utility which I've written in ruby and now that it > actually does some work I want to be able to test it. Next time, write the tests at the same time as you write the code. This is called "Test Driven Development", and it usually prevents issues like yours before they have a chance to exist. Specifically, your objects' interfaces will remain very narrow and decoupled. Tests usually sense the program state from convenient return values, and private variables remain private. -- Phlip