aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-08-12 14:20:15 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-08-12 14:30:53 -0700
commitb46c67fb472fc78c7b2aa225cba041ffe4d5c061 (patch)
treeaad528ad0196e9753f19ae40bb1df3bd25defa8e /actionpack/test/dispatch
parentb106dddfaf5eb34dee9eac8e8e01c02b24c3ea43 (diff)
downloadrails-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.rb8
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)