From 5786395760f1e1906c878df4023cac3741e66e87 Mon Sep 17 00:00:00 2001 From: rizwanreza Date: Sat, 8 Aug 2009 22:21:25 +0100 Subject: Allow content_tag options to take an array [#1741 state:resolved] [rizwanreza, Nick Quaranto] Example: content_tag('p', "limelight", :class => ["song", "play"]) # =>

limelight

Signed-off-by: Pratik Naik --- actionpack/test/template/tag_helper_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index ef88cae5b8..2aa3d5b5fa 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionpack/test/template/tag_helper_test.rb @@ -71,6 +71,19 @@ class TagHelperTest < ActionView::TestCase assert_equal '

Hello

', output_buffer end + def test_content_tag_with_escaped_array_class + str = content_tag('p', "limelight", :class => ["song", "play>"]) + assert_equal "

limelight

", str + + str = content_tag('p', "limelight", :class => ["song", "play"]) + assert_equal "

limelight

", str + end + + def test_content_tag_with_unescaped_array_class + str = content_tag('p', "limelight", {:class => ["song", "play>"]}, false) + assert_equal "

\">limelight

", str + end + def test_cdata_section assert_equal "]]>", cdata_section("") end -- cgit v1.2.3