diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-10-04 19:58:19 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-10-04 19:58:19 -0700 |
commit | a8c8a08f1ae7099f750058ef3e168810e5ad47d8 (patch) | |
tree | 2f7392d0efa7e32c2500b0a9d3a95e81e0e639f4 /railties/test | |
parent | 4b33bbc80374e486467f9a7b76e34e4ab2ce0b50 (diff) | |
parent | ab4c079536641e63ca51b6121864a75de7145256 (diff) | |
download | rails-a8c8a08f1ae7099f750058ef3e168810e5ad47d8.tar.gz rails-a8c8a08f1ae7099f750058ef3e168810e5ad47d8.tar.bz2 rails-a8c8a08f1ae7099f750058ef3e168810e5ad47d8.zip |
Merge pull request #7838 from guilleiguaran/extract-rack-cache
Disable Rack::Cache by default
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/middleware_test.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 3e096e99f2..b2443e6503 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -56,11 +56,20 @@ module ApplicationTests 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 present when action_controller.perform_caching is set" do + test "Rack::Cache is not included by default" do add_to_config "config.action_controller.perform_caching = true" boot! + assert !middleware.include?("Rack::Cache"), "Rack::Cache is not included in the default stack unless you set config.action_dispatch.rack_cache" + end + + test "Rack::Cache is present when action_controller.perform_caching is set and action_dispatch.rack_cache is set" do + add_to_config "config.action_controller.perform_caching = true" + add_to_config "config.action_dispatch.rack_cache = true" + + boot! + assert_equal "Rack::Cache", middleware.first end |