From 76b466ae33048a07bf0aa37ac2b1cb19ac621f94 Mon Sep 17 00:00:00 2001 From: Andrew Bloomgarden Date: Wed, 9 Jun 2010 15:17:38 -0700 Subject: [PATCH] Failing tests for ignore-case regexp option in routes. --- actionpack/test/dispatch/routing_test.rb | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index e13960e..67ad00e 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -189,7 +189,7 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest controller :articles do scope '/articles', :name_prefix => 'article' do - scope :path => '/:title', :title => /[a-z]+/, :as => :with_title do + scope :path => '/:title', :title => /[a-z]+/i, :as => :with_title do match '/:id', :to => :with_id end end @@ -1132,6 +1132,15 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end + def test_regexp_ignore_case + with_test_routes do + get '/articles/rails/1' + assert_equal 'articles#with_id', @response.body + assert_equal 'rails', @request.params[:title] + assert_equal '1', @request.params[:id] + end + end + private def with_test_routes yield -- 1.7.0.4