From: Anders Bengtsson Date: 2003-05-16T05:51:49+09:00 Subject: Re: Test::Unit sequencing ahoward wrote: > > "The first rule of unit testing is, don't let tests depend on each > > other. > > The second rule of unit testing is, don't let tests depend on each > > other." > > ;-) > > i know this creed, but it seems not to apply where databases are concerned... It applies particulary in the case of databases. :) Writing simple unit tests requires that you decouple your logic from your database code, which is usually considered a good thing. > IMHO. in brian's (and some of my) situation the database *is* the mock object > carying the state [snip] Well, kinda, but couldn't you replace this slow and complex mock object with a fast simple one, like something that just verifies SQL against a known-good list and returns predefined results? -- A n d e r s B e n g t s s o n | ndrsbngtssn@yahoo.se Stockholm, Sweden |