diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-01-04 19:38:56 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-01-04 19:40:16 -0600 |
commit | 76b5f18feba3f1d0507b4c4ec34d11d9bb1c493c (patch) | |
tree | 0b759bfcb59817b9a511b07f0be4743863ab8b9e /railties/test | |
parent | 56b28ec8d6b226414fb240d4d4f6f1bd25292dc9 (diff) | |
download | rails-76b5f18feba3f1d0507b4c4ec34d11d9bb1c493c.tar.gz rails-76b5f18feba3f1d0507b4c4ec34d11d9bb1c493c.tar.bz2 rails-76b5f18feba3f1d0507b4c4ec34d11d9bb1c493c.zip |
Default middleware stack needs to be available at configuration time
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/middleware_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 1b9c8c30fc..df564011d3 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -55,6 +55,18 @@ module ApplicationTests assert_equal "Rack::Config", middleware.last end + test "insert middleware after" do + add_to_config "config.middleware.insert_after ActionDispatch::Static, Rack::Config" + boot! + assert_equal "Rack::Config", middleware.second + end + + test "insert middleware before" do + add_to_config "config.middleware.insert_before ActionDispatch::Static, Rack::Config" + boot! + assert_equal "Rack::Config", middleware.first + end + private def boot! require "#{app_path}/config/environment" |