From: nobu.nokada@... Date: 2005-01-22T09:30:38+09:00 Subject: Re: Writing test cases/suites Hi, At Thu, 20 Jan 2005 16:26:00 +0900, Johan Nilsson wrote in [ruby-talk:127304]: > I'd still prefer the 'anonymous' module, but this will work. helper = Module.new do class CountingClient attr_reader :times_called def initialize @times_called = 0 end def on_cb(whatever) @times_called += 1 end end end TC_MyClass.class_eval {include(helper)} -- Nobu Nakada