diff options
author | Tim McEwan <tim@mcewan.it> | 2012-03-27 19:44:06 +1100 |
---|---|---|
committer | Tim McEwan <tim@mcewan.it> | 2012-03-27 19:46:15 +1100 |
commit | 7051a234b7b2f6d7db5b29b3afc7167a8b6db991 (patch) | |
tree | 3be320a810ac68ed8e993fdd78fec9f4c532620e /actionpack/test | |
parent | ded74dfd8b68153a2eec2a6c2bcee3c6e43bb91b (diff) | |
download | rails-7051a234b7b2f6d7db5b29b3afc7167a8b6db991.tar.gz rails-7051a234b7b2f6d7db5b29b3afc7167a8b6db991.tar.bz2 rails-7051a234b7b2f6d7db5b29b3afc7167a8b6db991.zip |
change number_with_precision to not return negative zeros
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/number_helper_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/test/template/number_helper_test.rb b/actionpack/test/template/number_helper_test.rb index 482d953907..5c6f23d70b 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -96,6 +96,7 @@ class NumberHelperTest < ActionView::TestCase assert_equal("0.001", number_with_precision(0.00111, :precision => 3)) assert_equal("10.00", number_with_precision(9.995, :precision => 2)) assert_equal("11.00", number_with_precision(10.995, :precision => 2)) + assert_equal("0.00", number_with_precision(-0.001, :precision => 2)) end def test_number_with_precision_with_custom_delimiter_and_separator |