Test that capture doesn't escape twice

This commit is contained in:
Santiago Pastorino 2010-11-02 20:02:55 -02:00
parent 72d12d9455
commit 3c7215bdce

@ -29,8 +29,13 @@ def test_capture_returns_nil_if_the_returned_value_is_not_a_string
end
def test_capture_escapes_html
string = @av.capture { '<strong>foo</strong><em>bar</em>' }
assert_equal '&lt;strong&gt;foo&lt;/strong&gt;&lt;em&gt;bar&lt;/em&gt;', string
string = @av.capture { '<em>bar</em>' }
assert_equal '&lt;em&gt;bar&lt;/em&gt;', string
end
def test_capture_doesnt_escape_twice
string = @av.capture { '&lt;em&gt;bar&lt;/em&gt;'.html_safe }
assert_equal '&lt;em&gt;bar&lt;/em&gt;', string
end
def test_content_for