From fc26af71368afd9ec07c0ad09dc2affd818db41d Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Mon, 8 Jan 2024 01:14:31 +0000 Subject: [PATCH] Refactor CustomFieldsControllerTest#custom_field_classes (#40008). git-svn-id: https://svn.redmine.org/redmine/trunk@22597 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/custom_fields_controller_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/functional/custom_fields_controller_test.rb b/test/functional/custom_fields_controller_test.rb index bc13e64b5..fd9c83b5f 100644 --- a/test/functional/custom_fields_controller_test.rb +++ b/test/functional/custom_fields_controller_test.rb @@ -594,10 +594,10 @@ class CustomFieldsControllerTest < Redmine::ControllerTest end def custom_field_classes - files = - Dir.glob(File.join(Rails.root, 'app/models/*_custom_field.rb')). - map {|f| File.basename(f).delete_suffix('.rb')} - classes = files.map {|x| x.classify.constantize} + classes = + Dir.glob(Rails.root.join('app/models/*_custom_field.rb')).map do |f| + File.basename(f, '.rb').classify.constantize + end assert classes.size > 0 classes end