diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-07-15 00:33:09 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-07-15 00:33:09 -0500 |
commit | 0b61cc730ee1fd2b40acac5886a62ea91c0b3d51 (patch) | |
tree | 21ee5cafaeb0a3f0ca396e9a818e52a0822b4454 /railties | |
parent | 207fa5c11ddf1cfd696f0eeb07d6466aae9d451e (diff) | |
download | rails-0b61cc730ee1fd2b40acac5886a62ea91c0b3d51.tar.gz rails-0b61cc730ee1fd2b40acac5886a62ea91c0b3d51.tar.bz2 rails-0b61cc730ee1fd2b40acac5886a62ea91c0b3d51.zip |
Rack::Sendfile is now included in middleware by default, change tests to reflect that
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/middleware_test.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 251fe02bc5..0d0d072db4 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -49,12 +49,6 @@ module ApplicationTests ], 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! @@ -143,7 +137,7 @@ module ApplicationTests 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 @@ -151,16 +145,16 @@ module ApplicationTests 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 |