diff options
author | Rick Olson <technoweenie@gmail.com> | 2008-03-24 02:29:30 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2008-03-24 02:29:30 +0000 |
commit | 5bf4cbbdb74dfaaac258dc93e54dcae8295211e9 (patch) | |
tree | 878655113e18bf45e5b8a7e7d1a90716ba56e60c /actionpack/test/template | |
parent | 0ff031992f1dc36cf36eaf26a1e476f67c29c048 (diff) | |
download | rails-5bf4cbbdb74dfaaac258dc93e54dcae8295211e9.tar.gz rails-5bf4cbbdb74dfaaac258dc93e54dcae8295211e9.tar.bz2 rails-5bf4cbbdb74dfaaac258dc93e54dcae8295211e9.zip |
Allow the #simple_format text_helper to take an html_options hash for each paragraph. Closes #2448 [Francois Beausoleil, thechrisoshow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/text_helper_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index dd5725376f..0cd83334d5 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -24,6 +24,9 @@ class TextHelperTest < Test::Unit::TestCase text = "A\r\n \nB\n\n\r\n\t\nC\nD".freeze assert_equal "<p>A\n<br /> \n<br />B</p>\n\n<p>\t\n<br />C\n<br />D</p>", simple_format(text) + + assert_equal %q(<p class="test">This is a classy test</p>), simple_format("This is a classy test", :class => 'test') + assert_equal %Q(<p class="test">para 1</p>\n\n<p class="test">para 2</p>), simple_format("para 1\n\npara 2", :class => 'test') end def test_truncate |