提交 f402cc5c 编写于 作者: C Carlos Antonio da Silva

Merge pull request #13152 from mariovisic/text_helper_missing_raw_method

TextHelper#simple_format attempts to call undefined raw method
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册