From: Craig Muth Date: 2007-06-26T02:51:42+09:00 Subject: Re: New gem for instantiating nested objects ------=_Part_3873_17284459.1182793904623 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline > There looks to be overlap with Mocha > (http://mocha.rubyforge.org/classes/Mocha/AutoVerify.html#M000005), > though, judging from your "Other features" section, not 100%. Thanks for the tip. I might have overlooked something but it seems the overlap is more in application than in functionality (meaning they differ functionally but can both be applied to creating objects for test cases). The lay() method creates instances of the target class and sets its attr's, whereas it looks like Mocha's stub and mock methods create anonymous objects, or modify or add methods to existing classes/objects. The lay() method can be fairly useful outside of test cases, as a shorthand for constructing objects that don't have convenient constructors (ie to avoid having code like: f = Foo.new; f.bar = "hey"; f.whatever = "hi"). Mocha primarily adds methods to Test::Unit::TestCase, whereas lay adds the lay() method to Class. Mocha does look pretty nice though. I'll probably make use of it for creating mock objects etc.. --Craig ------=_Part_3873_17284459.1182793904623--