From: ahoward Date: 2003-05-16T06:57:18+09:00 Subject: Re: Test::Unit sequencing On Fri, 16 May 2003, Anders Bengtsson wrote: > 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. my logic is *very* tightly coupled with the database code, in fact it is a database: a bi-temporal database emulator to be precise - postgresql wrapped in a ruby api: http://raa.ruby-lang.org/list.rhtml?name=btpgsql > 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? no. it's the interaction between the database and my api which is being tested! it is slow and *very* complex, much more so because of the bi-temporal aspect, but this slow complex behavior *is* what i'm testing. at the time - i couldn't see any alternatives (of course there probably are). -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ara.t.howard@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================