Fix issue where TextHelper#simple_format was calling missing 'raw' method

This commit is contained in:
Mario Visic 2013-12-04 13:50:17 +11:00
parent d261c5cc28
commit a156562762
2 changed files with 7 additions and 0 deletions

@ -31,6 +31,8 @@ module TextHelper
include SanitizeHelper
include TagHelper
include OutputSafetyHelper
# The preferred method of outputting text in your views is to use the
# <%= "text" %> eRuby syntax. The regular _puts_ and _print_ methods
# do not operate as expected in an eRuby code block. If you absolutely must

@ -21,6 +21,11 @@ def test_simple_format_should_be_html_safe
assert simple_format("<b> test with html tags </b>").html_safe?
end
def test_simple_format_included_in_isolation
helper_klass = Class.new { include ActionView::Helpers::TextHelper }
assert helper_klass.new.simple_format("<b> test with html tags </b>").html_safe?
end
def test_simple_format
assert_equal "<p></p>", simple_format(nil)