From: Duff O'Melia Date: 2001-03-25T10:40:01+09:00 Subject: [ruby-talk:13183] Request for additional Lapidary assert methods jweirich@one.net [mailto:jweirich@one.net] wrote: > Also, I've found that providing the negative version of some the > assertions is also helpful, e.g. assertNoMatch, assertNotNil, > assertNoRaises. (The "assertNoRaises" is ackward, perhaps > assertException and assertNoException would be a better pair.) >> Hmmm... I've also found them useful at various times. I'll think about >> these. The following assert methods have been very helpful to me in the past when using JUnit. I'm not sure if JUnit ships with them or if we added them later. I don't see equivalent methods in Lapidary. I agree with your goal, Nathaniel, of trying to keep the framework simple. However, I think these methods add significant value. Maybe there's another way to assert these things and I'm missing something. I think the following should be added to the framework: # To do instance checks: assertSame(expected, actual) assertNotSame(expected, actual) # One negation jweirich brought up and one other: assertNotEqual(expected, actual) assertNotNil(object) I'm unsure about the following being added: - I can't remember ever testing code to *not* throw an exception. Has anyone actually needed this? Therefore, I don't think the following method should be added to the framework. assertDoesNotRaise() - I haven't used regular expressions much (yet) so I'm not sure whether I'd use: assertDoesNotMatch(regularExpression, string) ==================================================================== Duff O'Melia RoleModel Software 342 Raleigh Street Holly Springs, NC 27540