aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/text_helper_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-06-21 07:16:11 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-06-21 07:16:11 +0000
commitc608ebeade50d3e87e750486e4949e8c3bdf1549 (patch)
tree404482786b05a35af2ab4ab5ee7eaac4ec959a1d /actionpack/test/template/text_helper_test.rb
parente59bfc85196cc4921f87b4b145048b7fa1fbbabb (diff)
downloadrails-c608ebeade50d3e87e750486e4949e8c3bdf1549.tar.gz
rails-c608ebeade50d3e87e750486e4949e8c3bdf1549.tar.bz2
rails-c608ebeade50d3e87e750486e4949e8c3bdf1549.zip
Added TextHelper#word_wrap(text, line_length = 80) #1449 [tuxie@dekadance.se]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1465 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/text_helper_test.rb')
-rw-r--r--actionpack/test/template/text_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb
index 722f08a7cf..2206ac7d04 100644
--- a/actionpack/test/template/text_helper_test.rb
+++ b/actionpack/test/template/text_helper_test.rb
@@ -67,6 +67,10 @@ class TextHelperTest < Test::Unit::TestCase
assert_equal("...iful morning", excerpt("This is a beautiful morning", "morning", 5))
assert_nil excerpt("This is a beautiful morning", "day")
end
+
+ def test_word_wrap
+ assert_equal("my very very\nvery long\nstring", word_wrap("my very very very long string", 15))
+ end
def test_pluralization
assert_equal("1 count", pluralize(1, "count"))