From: Tom Clarke Date: 2003-01-09T14:26:07+09:00 Subject: Re: Adding hooks to TestUnit I want to have something run before the setup in each test. As this is an API I'm writing, I want the users of the API to do minimal legwork - handling this initialization automatically will save people from subtle bugs. -Tom On Thu, Jan 09, 2003 at 02:08:15PM +0900, Dmitri Colebatch wrote: > use a singleton? > > you want something that is run once per suite right? > > ----- Original Message ----- > From: "Tom Clarke" > To: "ruby-talk ML" > Sent: Thursday, January 09, 2003 4:03 PM > Subject: Adding hooks to TestUnit > > > > In Narf I have a module that is included in a test class to provide > > additional facilities for web based testing. > > > > class MyWebTest < TestCase > > include Web::Testing > > > > def setup > > ... > > end > > > > ... tests > > end > > > > I need a way of performing an operation prior to the setup method > > being called before all tests where the Web::Testing module is > > included. > > > > Anyone know how I can do this, or does Test::Unit need to be enhanced? > > > > -Tom > >