diff options
author | Jon Moss <me@jonathanmoss.me> | 2015-12-28 22:20:53 -0500 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2015-12-28 22:20:53 -0500 |
commit | 66caf9ce764997985002758c352ac2e57d8e9285 (patch) | |
tree | a4583a5b55a21cb06044cd2d880ab9d0fa889644 /activesupport | |
parent | 2ad6deb5344abd77515f1c04edbd586a5538f705 (diff) | |
download | rails-66caf9ce764997985002758c352ac2e57d8e9285.tar.gz rails-66caf9ce764997985002758c352ac2e57d8e9285.tar.bz2 rails-66caf9ce764997985002758c352ac2e57d8e9285.zip |
Add test coverage for ActiveSupport::NumericWithFormat#to_formatted_s
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/core_ext/numeric_ext_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb index 0ff8f0f89b..6a420953b9 100644 --- a/activesupport/test/core_ext/numeric_ext_test.rb +++ b/activesupport/test/core_ext/numeric_ext_test.rb @@ -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 |