From 0f7c970e4f1cf0f3bcc01c22a6a3038cb3e34668 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 23 Nov 2010 18:04:05 -0800 Subject: Introduce ActionDispatch::Reloader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on the implementation on the 2-3-stable branch, patches by Hongli Lai , and helpful suggestions from José Valim. Hongli Lai's patches included locking around the request cycle; this is now handled by Rack::Lock (https://github.com/rack/rack/issues/issue/87/). [#2873] Signed-off-by: José Valim --- railties/test/application/middleware_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'railties/test/application/middleware_test.rb') diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 173ac40b12..a2217888e4 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -27,6 +27,7 @@ module ApplicationTests "ActionDispatch::ShowExceptions", "ActionDispatch::RemoteIp", "Rack::Sendfile", + "ActionDispatch::Reloader", "ActionDispatch::Callbacks", "ActiveRecord::ConnectionAdapters::ConnectionManagement", "ActiveRecord::QueryCache", @@ -81,6 +82,12 @@ module ApplicationTests assert !middleware.include?("ActionDispatch::ShowExceptions") end + test "removes ActionDispatch::Reloader if cache_classes is true" do + add_to_config "config.cache_classes = true" + boot! + assert !middleware.include?("ActionDispatch::Reloader") + end + test "use middleware" do use_frameworks [] add_to_config "config.middleware.use Rack::Config" -- cgit v1.2.3