diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-02 13:56:22 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-02 13:56:22 -0300 |
commit | f71265f7f8b3e284ec713b995c5d5b67557a3ef6 (patch) | |
tree | 15ad774a500e749120505e8932b01a05610abec0 /actionview | |
parent | 38454bb2666ca7d258a4ca2b53e16bcc3a2ee019 (diff) | |
parent | 60062cf39a6079cf6a47a754f4b5fc6c474b9b15 (diff) | |
download | rails-f71265f7f8b3e284ec713b995c5d5b67557a3ef6.tar.gz rails-f71265f7f8b3e284ec713b995c5d5b67557a3ef6.tar.bz2 rails-f71265f7f8b3e284ec713b995c5d5b67557a3ef6.zip |
Merge pull request #15379 from xuanxu/rational_precision
Fix AS::NumberHelper results with rationals
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/test/template/number_helper_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionview/test/template/number_helper_test.rb b/actionview/test/template/number_helper_test.rb index adb888319d..0495224d04 100644 --- a/actionview/test/template/number_helper_test.rb +++ b/actionview/test/template/number_helper_test.rb @@ -48,6 +48,7 @@ class NumberHelperTest < ActionView::TestCase assert_equal "-111.235", number_with_precision(-111.2346) assert_equal "111.00", number_with_precision(111, precision: 2) assert_equal "0.00100", number_with_precision(0.001, precision: 5) + assert_equal "3.33", number_with_precision(Rational(10, 3), precision: 2) end def test_number_to_human_size |