From: Sylvester Keil Date: 2011-12-12T05:26:35+09:00 Subject: Re: enforcing module contract with self.included? On Dec 11, 2011, at 8:43 PM, Grary Stimon wrote: > Sylvester, > > Thanks, that works, but not in another important manner of use... > > class SomeImplementingClass > include AgeBasedApprovable > end > > begin > SomeImplementingClass.new > puts 'FAIL' > rescue => e > puts 'PASS: ', e.message > end > > How do I cover this case? In this case, the proper hook method is Module.included (as you suggested in the beginning). In order to DRY you should consider moving the check to a separate method that you call in both self.included and self.extended.