Class: TableHelperTest
- Inherits:
-
ActionView::TestCase
- Object
- ActionView::TestCase
- TableHelperTest
- Includes:
- CrudTestHelper, CustomAssertions, FormatHelper, I18nHelper, UtilityHelper
- Defined in:
- lib/generators/dry_crud/templates/test/helpers/table_helper_test.rb
Overview
Test TableHelper
Constant Summary
Constants included from UtilityHelper
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
Methods included from CrudTestHelper
#action_name, #controller_name, #h, #model_class, #path_args, #sortable?
Methods included from CustomAssertions
#assert_count, #assert_not_valid, #assert_valid, #mu_pp
Methods included from I18nHelper
#translate_association, #translate_inheritable
Methods included from FormatHelper
#captionize, #f, #format_attr, #labeled, #labeled_attr, #render_attrs, #simple_list
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 Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
19 20 21 |
# File 'lib/generators/dry_crud/templates/test/helpers/table_helper_test.rb', line 19 def entries @entries end |
#params ⇒ Object
Returns the value of attribute params.
14 15 16 |
# File 'lib/generators/dry_crud/templates/test/helpers/table_helper_test.rb', line 14 def params @params end |
Instance Method Details
#empty_params ⇒ Object
29 30 31 |
# File 'lib/generators/dry_crud/templates/test/helpers/table_helper_test.rb', line 29 def empty_params @params = {} end |
#entry ⇒ Object
210 211 212 |
# File 'lib/generators/dry_crud/templates/test/helpers/table_helper_test.rb', line 210 def entry @entry ||= CrudTestModel.first end |
#format_size(obj) ⇒ Object
21 22 23 |
# File 'lib/generators/dry_crud/templates/test/helpers/table_helper_test.rb', line 21 def format_size(obj) "#{f(obj.size)} items" end |
#format_string_size(obj) ⇒ Object
25 26 27 |
# File 'lib/generators/dry_crud/templates/test/helpers/table_helper_test.rb', line 25 def format_string_size(obj) "#{f(obj.size)} chars" end |