From: Holden Glova Date: 2002-02-19T15:30:18+09:00 Subject: Re: Anonymous class support -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 19 Feb 2002 14:33, David Corbin wrote: > I find Java anonymous classes to be very helpful when writing UnitTests, > because I can overide a method for "one time use" just to verify it gets > called correctly. > > I realize that I can write a new class that responds to whatever methods > I need. But I'm talking about the syntactic convenience of defining > the method as part of the the new call. > > Does Ruby have support for anything like this? Perhaps the RubyMock project initiated by Nat Pryce can help here? I this quite often. http://www.b13media.com/dev/ruby/mock.html - -- Signed, Holden Glova -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8cfH0+mF116Lw2cQRAqstAJ9fAC+nY4dZIYaOeSpO7wxDPGRv9wCeOIGg jngXPbYi/yEcOurNY9KK5Bg= =xKDe -----END PGP SIGNATURE-----