aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/numeric_ext_test.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-12-29 08:42:36 +0100
committerYves Senn <yves.senn@gmail.com>2015-12-29 08:42:36 +0100
commit468df261f8a123dec1d36b22136476ae3660e1fa (patch)
treeaf2ac7ce6368baf68a98a8264e0b785e5bf31317 /activesupport/test/core_ext/numeric_ext_test.rb
parentb3cabb5aaed8822a815881f3bf8d9a6b46175a40 (diff)
parent66caf9ce764997985002758c352ac2e57d8e9285 (diff)
downloadrails-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/test/core_ext/numeric_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/numeric_ext_test.rb6
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