ソースを参照

Refactor CustomFieldsControllerTest#custom_field_classes (#40008).


git-svn-id: https://svn.redmine.org/redmine/trunk@22597 e93f8b46-1217-0410-a6f0-8f06a7374b81
pull/145/merge
Go MAEDA 5ヶ月前
コミット
fc26af7136
1個のファイルの変更4行の追加4行の削除
  1. 4
    4
      test/functional/custom_fields_controller_test.rb

+ 4
- 4
test/functional/custom_fields_controller_test.rb ファイルの表示

end end


def custom_field_classes 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 assert classes.size > 0
classes classes
end end

読み込み中…
キャンセル
保存