Permalink
Browse files

Rack::Sendfile is now included in middleware by default, change tests…

… to reflect that
  • Loading branch information...
1 parent 0c6b21e commit 5941a0fa88de27f422b7a15bd1eeddc0ade108aa @guilleiguaran guilleiguaran committed Jul 15, 2013
Showing with 4 additions and 10 deletions.
  1. +4 −10 railties/test/application/middleware_test.rb
@@ -49,12 +49,6 @@ def app
], middleware
end
- test "Rack::Sendfile is not included by default" do
- boot!
-
- assert !middleware.include?("Rack::Sendfile"), "Rack::Sendfile is not included in the default stack unless you set config.action_dispatch.x_sendfile_header"
- end
-
test "Rack::Cache is not included by default" do
boot!
@@ -135,24 +129,24 @@ def app
end
test "insert middleware after" do
- add_to_config "config.middleware.insert_after ActionDispatch::Static, Rack::Config"
+ add_to_config "config.middleware.insert_after Rack::Sendfile, Rack::Config"
boot!
assert_equal "Rack::Config", middleware.second
end
test "Rails.cache does not respond to middleware" do
add_to_config "config.cache_store = :memory_store"
boot!
- assert_equal "Rack::Runtime", middleware.third
+ assert_equal "Rack::Runtime", middleware.fourth
end
test "Rails.cache does respond to middleware" do
boot!
- assert_equal "Rack::Runtime", middleware.fourth
+ assert_equal "Rack::Runtime", middleware.fifth
end
test "insert middleware before" do
- add_to_config "config.middleware.insert_before ActionDispatch::Static, Rack::Config"
+ add_to_config "config.middleware.insert_before Rack::Sendfile, Rack::Config"
boot!
assert_equal "Rack::Config", middleware.first
end

0 comments on commit 5941a0f

Please sign in to comment.