Add test coverage for ActiveSupport::NumericWithFormat#to_formatted_s

This commit is contained in:
Jon Moss 2015-12-28 22:20:53 -05:00
parent 2ad6deb534
commit 66caf9ce76
1 changed files with 6 additions and 0 deletions

View File

@ -388,6 +388,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