summaryrefslogtreecommitdiffstats
path: root/script/spec_server
diff options
context:
space:
mode:
Diffstat (limited to 'script/spec_server')
-rwxr-xr-xscript/spec_server7
1 files changed, 5 insertions, 2 deletions
diff --git a/script/spec_server b/script/spec_server
index d48df92..3787a39 100755
--- a/script/spec_server
+++ b/script/spec_server
@@ -25,10 +25,13 @@ module Spec
end
end
- if ::Dispatcher.respond_to?(:cleanup_application)
- ::Dispatcher.cleanup_application
+ if ActionController.const_defined?(:Dispatcher)
+ dispatcher = ::ActionController::Dispatcher.new($stdout)
+ dispatcher.cleanup_application(true)
elsif ::Dispatcher.respond_to?(:reset_application!)
::Dispatcher.reset_application!
+ else
+ raise "Application reloading failed"
end
::Dependencies.mechanism = :load
require_dependency('application.rb') unless Object.const_defined?(:ApplicationController)