diff options
author | John Mileham <jmileham@gmail.com> | 2011-03-24 15:03:08 -0400 |
---|---|---|
committer | John Mileham <jmileham@gmail.com> | 2011-03-24 15:03:08 -0400 |
commit | b44a0ec153c84384e9b97a069e81f28bc5c2a4bf (patch) | |
tree | 94713aff0c241f91530dfd714bf685019c84ccab /actionpack/test/template/number_helper_test.rb | |
parent | d5994ee48af14d67f0eec7d23863d4b19211b078 (diff) | |
parent | 5214e73850916de3c9127d35a4ecee0424d364a3 (diff) | |
download | rails-b44a0ec153c84384e9b97a069e81f28bc5c2a4bf.tar.gz rails-b44a0ec153c84384e9b97a069e81f28bc5c2a4bf.tar.bz2 rails-b44a0ec153c84384e9b97a069e81f28bc5c2a4bf.zip |
Merge branch 'master' of github.com:rails/rails into count_behavior
Diffstat (limited to 'actionpack/test/template/number_helper_test.rb')
-rw-r--r-- | actionpack/test/template/number_helper_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/test/template/number_helper_test.rb b/actionpack/test/template/number_helper_test.rb index 156b7cb5ff..c8d50ebf75 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -140,7 +140,7 @@ class NumberHelperTest < ActionView::TestCase def test_number_with_precision_with_significant_true_and_zero_precision # Zero precision with significant is a mistake (would always return zero), - # so we treat it as if significant was false (increases backwards compatibily for number_to_human_size) + # so we treat it as if significant was false (increases backwards compatibility for number_to_human_size) assert_equal "124", number_with_precision(123.987, :precision => 0, :significant => true) assert_equal "12", number_with_precision(12, :precision => 0, :significant => true ) assert_equal "12", number_with_precision("12.3", :precision => 0, :significant => true ) @@ -195,7 +195,9 @@ class NumberHelperTest < ActionView::TestCase def test_number_to_human assert_equal '-123', number_to_human(-123) - assert_equal '0', number_to_human(0) + assert_equal '-0.5', number_to_human(-0.5) + assert_equal '0', number_to_human(0) + assert_equal '0.5', number_to_human(0.5) assert_equal '123', number_to_human(123) assert_equal '1.23 Thousand', number_to_human(1234) assert_equal '12.3 Thousand', number_to_human(12345) |