diff options
author | wmoxam <wesley.moxam@savvica.com> | 2009-08-07 17:52:08 -0400 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-08-08 02:05:10 +0100 |
commit | 98450fd168673c6bc698b3b2d3c264a9cd70a464 (patch) | |
tree | 23b145c31bb767c1851dabc65f26dc71561b8033 /actionpack/test/template | |
parent | 43b406bdb0a747392f30d3da404da3aa6fb29776 (diff) | |
download | rails-98450fd168673c6bc698b3b2d3c264a9cd70a464.tar.gz rails-98450fd168673c6bc698b3b2d3c264a9cd70a464.tar.bz2 rails-98450fd168673c6bc698b3b2d3c264a9cd70a464.zip |
Fix number_to_precision rounding error [#2071 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/test/template')
-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 57b740032e..85a97d570c 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -88,6 +88,7 @@ class NumberHelperTest < ActionView::TestCase assert_equal("111.00", number_with_precision(111, :precision => 2)) assert_equal("111.235", number_with_precision("111.2346")) assert_equal("31.83", number_with_precision("31.825", :precision => 2)) + assert_equal("3268", number_with_precision((32.675 * 100.00), :precision => 0)) assert_equal("112", number_with_precision(111.50, :precision => 0)) assert_equal("1234567892", number_with_precision(1234567891.50, :precision => 0)) |