From: obscured by code Date: 2005-11-02T08:57:07+09:00 Subject: Re: TeSLa, a Domain Specific Language for Unit Testing Well, I think your confusion stems from my use of the word "precondition". Thinking back, I realize it might have been better if I'd have used a different wording. In Eiffel a precondition is indeed (and I quote from Meyer's OOSC) "The boolean expression which defines the domain", but in this thread I've been using the word in the sense of: "A condition that must exist or be established before something can occur or be considered; a prerequisite." The word 'requires' in the code is therefore not used in the sense of the Eiffel keyword but rather to imply that what follows it is a *requirement* for 'assert' to succeed. In plain English, the following segment of code test_method :add_item => [:item4] do requires {@items = [:item1, :item2, :item3]} assert {size == 4} end should be read as, "it is required for the 'items' property of any Catalog instance to hold three items if the condition of 'size' being 4 is to be met after the method 'add_item' is called with an 'item' as parameter". All this leads me to think maybe a better syntax is, well... required (no pun intended). Any suggestions regarding this will be very much welcomed. As an aside note, I've been reading Dave Astels' proposal of a Behavior Driven approach (thanks James) and tend to agree with much of what he proposes. Perhaps I could use some ideas (and syntax) from BDD to make TeSLa more readable/intuitive. I'd still use Test::Unit underneath, though, as maintaining tool integration is still very important to me. Again, I'm very open to suggestions.