From: Gregory Brown Date: 2007-07-16T09:49:33+09:00 Subject: Re: weirdness with ruby unit testing on mac On 7/15/07, David Carlton wrote: > I guess I'm curious why using require is good in ruby files but bad > from the command line. Or is it bad in files too? (And, if so, > what's the replacement?) Is it just an issue of what's idiomatic (no > problem with that, idioms are important), or am I missing something > deeper? Oh, it's not really bad in either. The issue is you're not trying to require code, you're trying to run it. Require is used to load just once, usually to load in libraries. So what you are doing works fine, but it's unidiomatic. When you do a require, you usually won't expect the code to *do* anything besides load class definitions and the like.