This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: StS 2007 Daily Update: Method Testing
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
A new framework for unit-testing that takes advantage of Smalltalk's "live environment" is presented. The approach, called Method Tests, relies on the ease of plugging into the Smalltalk compiler from within the IDE. Unit-tests associated with a method are then run automatically whenever you save a method. Every method becomes a "unit" of its own, with its own tests which at the same time express the method's "contract".This provides benefits not unlike type-checking, but for dynamic languages. The Method Tests framework makes writing tests easy, by providing a simple four-method API based on Smalltalk's block closures. The implementation and issues relating to testing dependent packages and subclasses are explored, and solutions provided.