From: Matt Armstrong Date: 2001-10-13T05:21:38+09:00 Subject: [ruby-talk:22477] Re: [ANN] Lapidary 0.2.1 In article <002d01c15271$c72ea6f0$0201a8c0@abraham>, Nathaniel Talbott wrote: > Lapidary is a unit testing framework for the Ruby programming > language. You can find out more about it at > http://lapidary.sourceforge.net/. > > 0.2.1 is a long overdue release including a few bug fixes and a bunch > of new assertions. Those of you who are interested, please grab it and > let me know what you think. I plan on releasing a bit more often than > every six months in the future :-/ > > More details on what's new in this version can be had in the > ChangeLog: http://lapidary/sourceforge.net/docs/ChangeLog. Using Lapidary, is there an easy way for teardown() methods to know if the test failed? Why? My tests are verifying the contents of various dynamically built files on disk. They are all put into a temporary directory and when the test is done the directory is removed. But having that directory hang around for post-mortem analysis is handy when the test fails. I currently do this like so with Ruby Unit: def teardown unless $! cleandir(@test_dir) Dir.rmdir(@test_dir) if FileTest.directory?(@test_dir) end end But it seems like a hack. And I notice Lapidary uses throw/catch to process failed assertions *before* calling teardown, which I think prevents even this hack from working. :-) -- matt