Permalink
Browse files

Merge pull request #5119 from kennyj/fix_5114

Testcase for GH #5114.
  • Loading branch information...
2 parents 7f2548e + f5e69fc commit ef5670effd0088d147de5706078ba473d0d23c77 @tenderlove tenderlove committed Feb 22, 2012
Showing with 26 additions and 0 deletions.
  1. +26 −0 actionpack/test/dispatch/routing_test.rb
@@ -2402,3 +2402,29 @@ def app; Routes end
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

0 comments on commit ef5670e

Please sign in to comment.