From: Brian Candler Date: 2008-10-28T06:21:08+09:00 Subject: Re: how to detect if #super exists? Chuck Remes wrote: > On Oct 27, 2008, at 10:33 AM, Brian Candler wrote: > >> actually being called) > My specs have an anonymous class that I create in the #before block. > > e.g. > > before(:each) do > @base = Class.new do > # set instance variables, etc. > end.new > @base.extend MyModule > end Ah, so perhaps you could 'stub' these methods as @base = Class.new do def foo; end end.new > Looks like #defined?(super) was what I needed. That was new to me too :-) -- Posted via http://www.ruby-forum.com/.