1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Require active_support/core_ext/string/output_safety and use html_safe rather than use non-public SafeBuffer API.

This commit is contained in:
Mark J. Titorenko 2014-05-12 17:23:28 +01:00
parent 9c8242ee6a
commit 3703a8ae9b

View file

@ -1,5 +1,6 @@
require 'abstract_unit'
require 'active_support/number_helper'
require 'active_support/core_ext/string/output_safety'
module ActiveSupport
module NumberHelper
@ -97,7 +98,7 @@ module ActiveSupport
assert_equal("123,456,789.78901", number_helper.number_to_delimited(123456789.78901))
assert_equal("0.78901", number_helper.number_to_delimited(0.78901))
assert_equal("123,456.78", number_helper.number_to_delimited("123456.78"))
assert_equal("123,456.78", number_helper.number_to_delimited(ActiveSupport::SafeBuffer.new("123456.78")))
assert_equal("123,456.78", number_helper.number_to_delimited("123456.78".html_safe))
end
end