method
unstub_object
v5.2.3 -
Show latest stable
- Class:
ActiveSupport::Testing::SimpleStubs
unstub_object(stub)private
No documentation available.
# File activesupport/lib/active_support/testing/time_helpers.rb, line 45
def unstub_object(stub)
singleton_class = stub.object.singleton_class
singleton_class.send :silence_redefinition_of_method, stub.method_name
singleton_class.send :alias_method, stub.method_name, stub.original_method
singleton_class.send :undef_method, stub.original_method
end