module RSpec::Rails::ControllerExampleGroup

def route_defined?(routes, method)

def route_defined?(routes, method)
  return false if routes.nil?
  if routes.named_routes.respond_to?(:route_defined?)
    routes.named_routes.route_defined?(method)
  else
    routes.named_routes.helpers.include?(method)
  end
end