On 1/15/06, Logan Capaldo <logancapaldo / gmail.com> wrote:
> On Jan 15, 2006, at 8:47 PM, List Recv wrote:
> > The code - and it's require files - are constantly changing.  (That's
> > the whole point of continuos testing!).  I want to a) make sure to
> > reload all required files and b) make sure to start with a fresh
> > slate,
> > in terms of class definitions, ObjectSpace, and the like.
>
> Ok, so change the 'require's to 'load's and then stick it in a
> loop ;).

That's not quite sufficient. 'load' simply loads the file again. It
doesn't replace the result of previously loading the file. So if the
"signature" of the file is the same (all the same classes, methods,
variables, etc. declared only with different values/implementations)
you're good. But in the more frequent case where the signature changes
in a non-additive way (e.g. a method is removed), that change is *not*
propagated by a new load. That means the method that was removed is
still available within the test script, which may cause some tests to
pass which should fail and would fail if run under a new instance.

Jacob Fugal