From: Nathaniel Talbott Date: 2001-12-07T00:26:40+09:00 Subject: [ruby-talk:27692] RE: Lapidary's return value Phlip [mailto:phlip_cpp@yahoo.com] wrote: > Newsgroupies (including, of course, Nathan!): > > Ogle this snip of RubyUnit-based code: > > def main > > got = RUNIT::CUI::TestRunner.run(SubstanceAbuse_.suite) > > if got.error_size == 0 and got.failure_size == 0 then > puts "All tests passed!" > else > exit 1 > end > > end > > Call me old-fashioned. I want to return a success or failure > flag to the environment if my test fails. > > This would let me batch a bunch of tests - including Lapidary > tests, and "acceptance" tests - together, and get instant > death after a clear error message if any of them failed. > > The above does not work in Lapidary because TestRunner.run > returns stack trash, not a clear useful object to evaluate. > > How do I beat this info out of Lapidary? Well.... first of all, it does more if you ask nicely :-) Seriously, though, this is a feature I've found useful myself (those have the highest incidence of inclusion into Lapidary) and which I have added support for in the CVS. Currently I would suggest being careful with the CVS version, as it is in quite a state of flux, but in general it should be usable (at least all the tests run!) As far as the next version release, I am working on it, if a bit more slowly than I would like. Perhaps, like Matz, I'll deliver a Christmas or New Year's present :-) Nathaniel <:((>< + - - | RoleModel Software, Inc. | EQUIP VI