diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-08-11 23:30:09 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-08-11 23:30:09 +0200 |
commit | 73c9e6a7aa7e3d082f969d5f0e5a6a0e2e2e4232 (patch) | |
tree | f2d488df3d876f1503cbec7e5776a50147d08a02 /actionview/test | |
parent | c18f81975c36961b053224c7aad4bce737373601 (diff) | |
parent | cf93c6ae48cad47fda5c864c8b7b232f88bec088 (diff) | |
download | rails-73c9e6a7aa7e3d082f969d5f0e5a6a0e2e2e4232.tar.gz rails-73c9e6a7aa7e3d082f969d5f0e5a6a0e2e2e4232.tar.bz2 rails-73c9e6a7aa7e3d082f969d5f0e5a6a0e2e2e4232.zip |
Merge pull request #21086 from bukue/add_break_sequence_option_to_word_wrap
Parametrize break sequence for word_wrap on ActionView Text Helpers
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/text_helper_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionview/test/template/text_helper_test.rb b/actionview/test/template/text_helper_test.rb index 5791f33069..fae1965ffa 100644 --- a/actionview/test/template/text_helper_test.rb +++ b/actionview/test/template/text_helper_test.rb @@ -366,6 +366,10 @@ class TextHelperTest < ActionView::TestCase assert_equal options, passed_options end + def test_word_wrap_with_custom_break_sequence + assert_equal("1234567890\r\n1234567890\r\n1234567890", word_wrap("1234567890 " * 3, line_width: 2, break_sequence: "\r\n")) + end + def test_pluralization assert_equal("1 count", pluralize(1, "count")) assert_equal("2 counts", pluralize(2, "count")) |