From f9f32e04ad57c37353a756673794a41026f65a34 Mon Sep 17 00:00:00 2001 From: Mikko Johansson Date: Mon, 20 Jan 2014 17:31:11 +0200 Subject: Automatically convert dashes to underscores in shorthand routes --- actionpack/test/dispatch/routing_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 795911497e..497c3e568c 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -2912,6 +2912,16 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest assert @response.ok?, 'route with trailing slash and with QUERY_STRING should work' end + def test_shorthand_route_with_dashes_in_path + draw do + get '/about-us/index' + end + + get '/about-us/index' + assert_equal 'about_us#index', @response.body + assert_equal '/about-us/index', about_us_index_path + end + private def draw(&block) -- cgit v1.2.3