From: Grary Stimon Date: 2011-12-12T03:59:33+09:00 Subject: enforcing module contract with self.included? Hey, What is the corresponding code in the AgeBasedApprovable module to beget the behavior in the test below? If it is use of self.included, I've not been able to get it to work... describe AgeBasedApprovable do it "requires host object to provide a 'birthdate' method" do host = Object.new expect do host.extend(AgeBasedApprovable) end.to raise_error(/Objects that extend AgeBasedApprovable must provide a 'birthdate' method/) end end Thanks, Grar -- Posted via http://www.ruby-forum.com/.