Method: Mocha::ClassMethod#hide_original_method
- Defined in:
- lib/mocha/class_method.rb
#hide_original_method ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/mocha/class_method.rb', line 29 def hide_original_method if method_exists?(method) begin stubbee..send(:alias_method, hidden_method, method) rescue NameError # deal with nasties like ActiveRecord::Associations::AssociationProxy end end end |