vendor/gems/flexmock-0.8.5/lib/flexmock/core.rb
# Override the existing definition of method +sym+ in the mock.
# Most methods depend on the method_missing trick to be invoked.
# However, if the method already exists, it will not call
# method_missing.  This method defines a singleton method on the
# mock to explicitly invoke the method_missing logic.
Override the existing definition of method +sym+ in the mock.
Most methods depend on the method_missing trick to be invoked.
However, if the method already exists, it will not call
method_missing.  This method defines a singleton method on the
mock to explicitly invoke the method_missing logic.
Override the existing definition of method + sym + in the mock . Most methods depend on the method_missing trick to be invoked . However if the method already exists it will not call method_missing . This method defines a singleton method on the mock to explicitly invoke the method_missing logic .
def override_existing_method(sym)
    sclass.class_eval <<-EOS
      def #{sym}(*args, &block)
        method_missing(:#{sym}, *args, &block)
      end
    EOS
  end
def override_existing_method ( sym ) sclass . class_eval <<-EOS 
      def  #{ sym } (*args, &block)
        method_missing(: #{ sym } , *args, &block)
      end
     EOS end
Override the existing definition of method +sym+ in the mock.
Override the existing definition of method + sym + in the mock .
sym