# File lib/mocha/class_method.rb, line 51 51: def restore_original_method 52: if method_exists?(hidden_method) 53: begin 54: stubbee.__metaclass__.send(:alias_method, method, hidden_method) 55: stubbee.__metaclass__.send(:remove_method, hidden_method) 56: rescue NameError 57: # deal with nasties like ActiveRecord::Associations::AssociationProxy 58: end 59: end 60: end