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

Merge pull request #22824 from maclover7/add-numericwithformat-tests

Add test coverage for ActiveSupport::NumericWithFormat#to_formatted_s
This commit is contained in:
Yves Senn 2015-12-29 08:42:36 +01:00
commit 468df261f8

View file

@ -400,6 +400,12 @@ class NumericExtFormattingTest < ActiveSupport::TestCase
assert_equal '1 Million', BigDecimal("1000010").to_s(:human)
end
def test_to_formatted_s_is_deprecated
assert_deprecated do
5551234.to_formatted_s(:phone)
end
end
def test_in_milliseconds
assert_equal 10_000, 10.seconds.in_milliseconds
end