From: Michael Schuerig Date: 2005-07-02T07:45:43+09:00 Subject: Re: How to use Test::Unit::Assertions from class methods? gabriele renzi wrote: > Michael Schuerig ha scritto: >> For unit tests I've written a mock object that should check its >> arguments against expected arguments using assertions from >> Test::Unit::Assertions. For instance methods I can include >> Test::Unit::Assertions in the mock class, that's easy. But how can I >> use these assertions in a class method? > > IIUC, the #extend method is what you need, instead of #include Yes, thanks, that is it. I've found a short note to that effect on p.385 of PickAxe2, also. Michael -- Michael Schuerig Most people would rather die than think. mailto:michael@schuerig.de In fact, they do. http://www.schuerig.de/michael/ --Bertrand Russell