diff options
author | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2010-07-20 11:07:13 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-26 17:26:59 +0200 |
commit | da845275dde0f7c13f4a24c0366f809c5006e70a (patch) | |
tree | ca232b3d90866e0d5c174fe0fa66e487850bd570 /actionpack/test | |
parent | f70c0b348d2f703d763a8136df7837567f7cb691 (diff) | |
download | rails-da845275dde0f7c13f4a24c0366f809c5006e70a.tar.gz rails-da845275dde0f7c13f4a24c0366f809c5006e70a.tar.bz2 rails-da845275dde0f7c13f4a24c0366f809c5006e70a.zip |
Removed deprecated APIs in text and number helpers [#5156 state:resolved]
They're deprecated since 2008. It's time to get rid of them.
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/number_helper_test.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/actionpack/test/template/number_helper_test.rb b/actionpack/test/template/number_helper_test.rb index 14e81fc9dc..7f787b7b00 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -82,16 +82,6 @@ class NumberHelperTest < ActionView::TestCase assert_equal '12.345.678,05', number_with_delimiter(12345678.05, :delimiter => '.', :separator => ',') end - def test_number_with_delimiter_old_api - silence_deprecation_warnings - assert_equal '12 345 678', number_with_delimiter(12345678, " ") - assert_equal '12-345-678.05', number_with_delimiter(12345678.05, '-') - assert_equal '12.345.678,05', number_with_delimiter(12345678.05, '.', ',') - assert_equal '12,345,678.05', number_with_delimiter(12345678.05, ',', '.') - assert_equal '12 345 678-05', number_with_delimiter(12345678.05, ',', '.', :delimiter => ' ', :separator => '-') - restore_deprecation_warnings - end - def test_number_with_precision assert_equal("111.235", number_with_precision(111.2346)) assert_equal("31.83", number_with_precision(31.825, :precision => 2)) @@ -146,15 +136,6 @@ class NumberHelperTest < ActionView::TestCase assert_equal "12", number_with_precision("12.3", :precision => 0, :significant => true ) end - def test_number_with_precision_old_api - silence_deprecation_warnings - assert_equal("31.8250", number_with_precision(31.825, 4)) - assert_equal("111.235", number_with_precision(111.2346, 3)) - assert_equal("111.00", number_with_precision(111, 2)) - assert_equal("111.000", number_with_precision(111, 2, :precision =>3)) - restore_deprecation_warnings - end - def test_number_to_human_size assert_equal '0 Bytes', number_to_human_size(0) assert_equal '1 Byte', number_to_human_size(1) @@ -202,14 +183,6 @@ class NumberHelperTest < ActionView::TestCase assert_equal '1.000,1 TB', number_to_human_size(terabytes(1000.1), :precision => 5, :delimiter => '.', :separator => ',') end - def test_number_to_human_size_old_api - silence_deprecation_warnings - assert_equal '1.3143 KB', number_to_human_size(kilobytes(1.3143), 4, :significant => false) - assert_equal '10.45 KB', number_to_human_size(kilobytes(10.453), 4) - assert_equal '10 KB', number_to_human_size(kilobytes(10.453), 4, :precision => 2) - restore_deprecation_warnings - end - def test_number_to_human assert_equal '123', number_to_human(123) assert_equal '1.23 Thousand', number_to_human(1234) |