Class: FormatHelperTest

Inherits:
ActionView::TestCase
  • Object
show all
Includes:
CrudTestHelper, I18nHelper, UtilityHelper
Defined in:
lib/generators/dry_crud/templates/test/helpers/format_helper_test.rb

Overview

Test FormatHelper

Constant Summary

Constants included from UtilityHelper

UtilityHelper::EMPTY_STRING

Instance Method Summary collapse

Methods included from CrudTestHelper

#action_name, #controller_name, #h, #model_class, #params, #path_args, #sortable?

Methods included from I18nHelper

#translate_association, #translate_inheritable

Methods included from UtilityHelper

#add_css_class, #assoc_and_id_attr, #association, #column_property, #column_type, #content_tag_nested, #default_crud_attrs, #flash_class, #safe_join

Instance Method Details

#format_size(obj) ⇒ Object



14
15
16
# File 'lib/generators/dry_crud/templates/test/helpers/format_helper_test.rb', line 14

def format_size(obj)
  "#{f(obj.size)} items"
end

#format_string_size(obj) ⇒ Object



18
19
20
# File 'lib/generators/dry_crud/templates/test/helpers/format_helper_test.rb', line 18

def format_string_size(obj)
  "#{f(obj.size)} chars"
end