diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-12 14:20:15 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-12 14:30:53 -0700 |
commit | b46c67fb472fc78c7b2aa225cba041ffe4d5c061 (patch) | |
tree | aad528ad0196e9753f19ae40bb1df3bd25defa8e /actionpack/test/dispatch | |
parent | b106dddfaf5eb34dee9eac8e8e01c02b24c3ea43 (diff) | |
download | rails-b46c67fb472fc78c7b2aa225cba041ffe4d5c061.tar.gz rails-b46c67fb472fc78c7b2aa225cba041ffe4d5c061.tar.bz2 rails-b46c67fb472fc78c7b2aa225cba041ffe4d5c061.zip |
pull `via` all the way out of `add_route`
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/mapper_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/mapper_test.rb b/actionpack/test/dispatch/mapper_test.rb index bd9786899f..e36f1718ac 100644 --- a/actionpack/test/dispatch/mapper_test.rb +++ b/actionpack/test/dispatch/mapper_test.rb @@ -40,6 +40,14 @@ module ActionDispatch Mapper.new FakeSet.new end + def test_blows_up_without_via + fakeset = FakeSet.new + mapper = Mapper.new fakeset + assert_raises(ArgumentError) do + mapper.match '/', :to => 'posts#index', :as => :main + end + end + def test_mapping_requirements options = { } m = Mapper::Mapping.build({}, FakeSet.new, '/store/:name(*rest)', nil, 'foo', 'bar', nil, [:get], options) |