From 229064cf3a4da96ad3e30114d99288bf6660ed58 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Wed, 6 Jan 2016 15:01:14 +0900 Subject: make generated controller test work correctly Since the `#file_name` that not consideration for the namespace, if generate a controller with a namespace, not the correct url helper generation, it had become an error to run the test. Modified to generate the correct url helper, even if it is produced a namespace with controller. --- .../rails/generators/test_unit/controller/templates/functional_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb') diff --git a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb index 4f2ceb8589..ff41fef9e9 100644 --- a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb +++ b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb @@ -13,7 +13,7 @@ class <%= class_name %>ControllerTest < ActionDispatch::IntegrationTest <% else -%> <% actions.each do |action| -%> test "should get <%= action %>" do - get <%= file_name %>_<%= action %>_url + get <%= url_helper_prefix %>_<%= action %>_url assert_response :success end -- cgit v1.2.3