aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorkennyj <kennyj@gmail.com>2012-02-22 02:24:22 +0900
committerkennyj <kennyj@gmail.com>2012-02-22 02:24:22 +0900
commitf5e69fc7dbe5575d35bb4d2293a79763bb3f639b (patch)
tree96cc95a4676bebce7302b98373e352c5b07b876d /actionpack
parent67a5157974ed9809570e2b29b69b59b85a4c7c52 (diff)
downloadrails-f5e69fc7dbe5575d35bb4d2293a79763bb3f639b.tar.gz
rails-f5e69fc7dbe5575d35bb4d2293a79763bb3f639b.tar.bz2
rails-f5e69fc7dbe5575d35bb4d2293a79763bb3f639b.zip
Testcase for GH #5114.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/dispatch/routing_test.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 563c6efe0d..e8da790e50 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -2402,3 +2402,29 @@ class TestMultipleNestedController < ActionDispatch::IntegrationTest
end
+class TestTildeAndMinusPaths < ActionDispatch::IntegrationTest
+ Routes = ActionDispatch::Routing::RouteSet.new.tap do |app|
+ app.draw do
+ match "/~user" => lambda { |env|
+ [200, { 'Content-Type' => 'text/plain' }, []]
+ }, :as => :tilde_path
+ match "/young-and-fine" => lambda { |env|
+ [200, { 'Content-Type' => 'text/plain' }, []]
+ }, :as => :tilde_path
+ end
+ end
+
+ include Routes.url_helpers
+ def app; Routes end
+
+ test 'recognizes tilde path' do
+ get "/~user"
+ assert_equal "200", @response.code
+ end
+
+ test 'recognizes minus path' do
+ get "/young-and-fine"
+ assert_equal "200", @response.code
+ end
+
+end