From: Christian Neukirchen Date: 2007-01-26T01:26:50+09:00 Subject: Re: test/spec -- was Re: I don't get rspec "Nick Sieger" writes: > On 1/24/07, Christian Neukirchen wrote: >> >> > >> > If it's just a matter of namespacing for reporting/organization that's >> > kind of interesting. >> >> I'm not sure how I could implement that (and I wont ;-)). But maybe >> includable setups would be useful. >> >> module UserSetup >> setup do # ??? >> @user = User.new >> end >> end > > > It's actually pretty easy if you don't mind using the Module#included hook. > > module UserSetup > def self.included(context) > context.setup do > @user = User.new > end > end > end > > But I'm sure you would have figured that out eventually... :) Nifty, thanks! > Cheers, > /Nick -- Christian Neukirchen http://chneukirchen.org