diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-07-26 17:33:22 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-07-26 17:33:22 -0700 |
commit | ba43b9bf5f8a85759939462944f4994c9b1e1ac9 (patch) | |
tree | 48c5b09cf9c5239c02d81f1b46655e8817413e1d /actionpack/test/dispatch | |
parent | e4a7b23d382d9cf66771c0ce3eefe35c08e3711a (diff) | |
download | rails-ba43b9bf5f8a85759939462944f4994c9b1e1ac9.tar.gz rails-ba43b9bf5f8a85759939462944f4994c9b1e1ac9.tar.bz2 rails-ba43b9bf5f8a85759939462944f4994c9b1e1ac9.zip |
fixing wildcard path matching when wildcard is inside parenthesis
Diffstat (limited to 'actionpack/test/dispatch')
-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 |