> > > module MyTestModule > > > def setup > > > @setup_called = true > > > end > > > def test_setup_called > > > assert(@setup_called, "You need to call super in your setup") > > > end > > > end > > > > question from a ruby newbie.... I'm assuming there's no such > > thing as declaring a method as final in ruby? if there > > is/was then the obvious solution to me is to use the template pattern. > > Well, as far as I know there's (thankfully!) nothing like final in Ruby. > But I guess I don't understand what you're getting at... what would > final add, and what would you do with the template pattern? hehe... "thankfully" (o: I suppose this is one of the differences between a static and a dynamic language (the reason I'm playing with ruby is to explore the benefits/tradeoffs of static vs dynamic languages).. anyway, using finally, I would do this: module MyTestModule 'final' def setup # other setup stuff that needs to be done. doSetup end def doSetup # dont force them to do anything end end does that work? to be honest I hadn't clicked that this is at the module level and not the class level - so I may be missing something obvious.... haven't got my head around how module polymorphism works yet.... (is that the correct terminology?) cheers dim