diff options
author | Yoshiyuki Hirano <yhirano@me.com> | 2017-08-14 08:12:56 +0900 |
---|---|---|
committer | Yoshiyuki Hirano <yhirano@me.com> | 2017-08-14 08:12:56 +0900 |
commit | d1dabde8a24d124d21928962d01c813620cb62db (patch) | |
tree | d1eac3499b63fbbac6698f67f28df9c6d922cace /railties/test/generators | |
parent | 788f46d4863a0f38ecec042864da291f2342ec74 (diff) | |
download | rails-d1dabde8a24d124d21928962d01c813620cb62db.tar.gz rails-d1dabde8a24d124d21928962d01c813620cb62db.tar.bz2 rails-d1dabde8a24d124d21928962d01c813620cb62db.zip |
Optimize routes indentation
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/controller_generator_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/generators/controller_generator_test.rb b/railties/test/generators/controller_generator_test.rb index af86a0136f..d7ff5c42ff 100644 --- a/railties/test/generators/controller_generator_test.rb +++ b/railties/test/generators/controller_generator_test.rb @@ -100,4 +100,11 @@ class ControllerGeneratorTest < Rails::Generators::TestCase assert_match(/^ namespace :admin do\n get 'dashboard\/index'\n end$/, route) end end + + def test_namespaced_routes_with_multiple_actions_are_created_in_routes + run_generator ["admin/dashboard", "index", "show"] + assert_file "config/routes.rb" do |route| + assert_match(/^ namespace :admin do\n get 'dashboard\/index'\n get 'dashboard\/show'\n end$/, route) + end + end end |