mirror of
https://github.com/github/rails.git
synced 2026-01-23 05:17:59 -05:00
Better fix for requireing a missing route file in unit tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@643 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -238,7 +238,9 @@ module ActionController
|
||||
|
||||
def reload
|
||||
begin
|
||||
require_dependency(ROUTE_FILE) if Object.method_defined?(:require_dependency)
|
||||
require_dependency(ROUTE_FILE)
|
||||
rescue NoMethodError
|
||||
# ignore for unit tests
|
||||
rescue LoadError, ScriptError => e
|
||||
raise RoutingError, "Cannot load config/routes.rb:\n #{e.message}"
|
||||
ensure # Ensure that there is at least one route:
|
||||
|
||||
Reference in New Issue
Block a user