mirror of
https://github.com/redmine/redmine.git
synced 2025-11-11 07:46:02 +01:00
Refactor CustomFieldsControllerTest#custom_field_classes (#40008).
git-svn-id: https://svn.redmine.org/redmine/trunk@22597 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user