# File lib/mocha/instance_method.rb, line 7 7: def method_exists?(method) 8: existing_methods = [] 9: existing_methods += stubbee.public_methods(false) 10: existing_methods += stubbee.protected_methods(false) 11: existing_methods += stubbee.private_methods(false) 12: existing_methods.any? { |m| m.to_s == method.to_s } 13: end