diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-07-26 17:33:22 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-08-13 16:22:19 -0700 |
commit | f445bb26715406a5718bbf4652bbfa4d8be0b60d (patch) | |
tree | 0b2a4da6fab4d8a2a1c3e933e5e0b15f56e9a061 /actionpack/test/dispatch/mapper_test.rb | |
parent | ab422b04a2fd8144a26d82f2ec1efeeb684b29db (diff) | |
download | rails-f445bb26715406a5718bbf4652bbfa4d8be0b60d.tar.gz rails-f445bb26715406a5718bbf4652bbfa4d8be0b60d.tar.bz2 rails-f445bb26715406a5718bbf4652bbfa4d8be0b60d.zip |
fixing wildcard path matching when wildcard is inside parenthesis
Diffstat (limited to 'actionpack/test/dispatch/mapper_test.rb')
-rw-r--r-- | actionpack/test/dispatch/mapper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/mapper_test.rb b/actionpack/test/dispatch/mapper_test.rb index 81f0efb76e..3316dd03aa 100644 --- a/actionpack/test/dispatch/mapper_test.rb +++ b/actionpack/test/dispatch/mapper_test.rb @@ -35,6 +35,13 @@ module ActionDispatch Mapper.new FakeSet.new end + def test_mapping_requirements + options = { :controller => 'foo', :action => 'bar' } + m = Mapper::Mapping.new FakeSet.new, {}, '/store/:name(*rest)', options + _, _, requirements, _ = m.to_route + assert_equal(/.+?/, requirements[:rest]) + end + def test_map_slash fakeset = FakeSet.new mapper = Mapper.new fakeset |