class ActiveSupport::Testing::SimpleStubs

def unstub_object(stub)

def unstub_object(stub)
  singleton_class = stub.object.singleton_class
  singleton_class.send :undef_method, stub.method_name
  singleton_class.send :alias_method, stub.method_name, stub.original_method
  singleton_class.send :undef_method, stub.original_method
end