diff options
author | José Valim <jose.valim@gmail.com> | 2011-04-15 20:09:39 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-04-15 20:09:39 +0200 |
commit | d5ad92ced1786b742c3ecce3cb60d851c7200bc9 (patch) | |
tree | 6979391fe7406a4bb494c3240b5cabaaa641437a /actionpack/test/dispatch | |
parent | afc828828ffffe7edeb4648a9d2aa4731191ae21 (diff) | |
download | rails-d5ad92ced1786b742c3ecce3cb60d851c7200bc9.tar.gz rails-d5ad92ced1786b742c3ecce3cb60d851c7200bc9.tar.bz2 rails-d5ad92ced1786b742c3ecce3cb60d851c7200bc9.zip |
Make static faster as we don't have to serve multiple paths anymore.
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/static_test.rb | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/actionpack/test/dispatch/static_test.rb b/actionpack/test/dispatch/static_test.rb index 655745a848..2ebbed4414 100644 --- a/actionpack/test/dispatch/static_test.rb +++ b/actionpack/test/dispatch/static_test.rb @@ -47,35 +47,4 @@ class StaticTest < ActiveSupport::TestCase end include StaticTests -end - -class MultipleDirectorisStaticTest < ActiveSupport::TestCase - DummyApp = lambda { |env| - [200, {"Content-Type" => "text/plain"}, ["Hello, World!"]] - } - App = ActionDispatch::Static.new(DummyApp, - { "/" => "#{FIXTURE_LOAD_PATH}/public", - "/blog" => "#{FIXTURE_LOAD_PATH}/blog_public", - "/foo" => "#{FIXTURE_LOAD_PATH}/non_existing_dir" - }) - - def setup - @app = App - end - - include StaticTests - - test "serves files from other mounted directories" do - assert_html "/blog/index.html", get("/blog/index.html") - assert_html "/blog/index.html", get("/blog/index") - assert_html "/blog/index.html", get("/blog/") - - assert_html "/blog/blog.html", get("/blog/blog/") - assert_html "/blog/blog.html", get("/blog/blog.html") - assert_html "/blog/blog.html", get("/blog/blog") - - assert_html "/blog/subdir/index.html", get("/blog/subdir/index.html") - assert_html "/blog/subdir/index.html", get("/blog/subdir/") - assert_html "/blog/subdir/index.html", get("/blog/subdir") - end -end +end
\ No newline at end of file |