diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-12-29 08:42:36 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-12-29 08:42:36 +0100 |
commit | 468df261f8a123dec1d36b22136476ae3660e1fa (patch) | |
tree | af2ac7ce6368baf68a98a8264e0b785e5bf31317 /activesupport | |
parent | b3cabb5aaed8822a815881f3bf8d9a6b46175a40 (diff) | |
parent | 66caf9ce764997985002758c352ac2e57d8e9285 (diff) | |
download | rails-468df261f8a123dec1d36b22136476ae3660e1fa.tar.gz rails-468df261f8a123dec1d36b22136476ae3660e1fa.tar.bz2 rails-468df261f8a123dec1d36b22136476ae3660e1fa.zip |
Merge pull request #22824 from maclover7/add-numericwithformat-tests
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 8636da1b93..42109a8f17 100644 --- a/activesupport/test/core_ext/numeric_ext_test.rb +++ b/activesupport/test/core_ext/numeric_ext_test.rb @@ -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 |