diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-09-05 10:18:15 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-09-05 10:21:55 -0300 |
commit | e20012b64b2063b75cbf1acc57195f0c410987de (patch) | |
tree | 3f3a7a557aa4d67b35c39e3bdce1cb8774e40481 /actionpack/test | |
parent | d717ff9e52445c73745cb0c2ef1d829de10ead8e (diff) | |
download | rails-e20012b64b2063b75cbf1acc57195f0c410987de.tar.gz rails-e20012b64b2063b75cbf1acc57195f0c410987de.tar.bz2 rails-e20012b64b2063b75cbf1acc57195f0c410987de.zip |
Make number_to_human and number_with_precision work with negatives
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/number_helper_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/test/template/number_helper_test.rb b/actionpack/test/template/number_helper_test.rb index 31461e1833..c14dfb250f 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -83,6 +83,7 @@ class NumberHelperTest < ActionView::TestCase end def test_number_with_precision + assert_equal("-111.235", number_with_precision(-111.2346)) assert_equal("111.235", number_with_precision(111.2346)) assert_equal("31.83", number_with_precision(31.825, :precision => 2)) assert_equal("111.23", number_with_precision(111.2346, :precision => 2)) @@ -184,6 +185,7 @@ class NumberHelperTest < ActionView::TestCase end def test_number_to_human + assert_equal '-123', number_to_human(-123) assert_equal '0', number_to_human(0) assert_equal '123', number_to_human(123) assert_equal '1.23 Thousand', number_to_human(1234) |