aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/number_helper_test.rb
diff options
context:
space:
mode:
authorJared Beck <jared@jaredbeck.com>2012-05-28 04:42:53 -0400
committerJared Beck <jared@jaredbeck.com>2012-05-28 04:42:53 -0400
commit371508c240f556539ce8891b05e8715f546b0e4d (patch)
treeb392a6621de630079df0c901d9a74c462bd2dc01 /activesupport/test/number_helper_test.rb
parent135f620535d94af262d11f62bb814a2010701b1d (diff)
downloadrails-371508c240f556539ce8891b05e8715f546b0e4d.tar.gz
rails-371508c240f556539ce8891b05e8715f546b0e4d.tar.bz2
rails-371508c240f556539ce8891b05e8715f546b0e4d.zip
Fix handling of negative zero in number_to_currency
Diffstat (limited to 'activesupport/test/number_helper_test.rb')
-rw-r--r--activesupport/test/number_helper_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/test/number_helper_test.rb b/activesupport/test/number_helper_test.rb
index 8bcdea7ce6..9b7d7f020c 100644
--- a/activesupport/test/number_helper_test.rb
+++ b/activesupport/test/number_helper_test.rb
@@ -64,6 +64,8 @@ module ActiveSupport
assert_equal("$1,234,567,890.50", number_helper.number_to_currency("1234567890.50"))
assert_equal("1,234,567,890.50 K&#269;", number_helper.number_to_currency("1234567890.50", {:unit => "K&#269;", :format => "%n %u"}))
assert_equal("1,234,567,890.50 - K&#269;", number_helper.number_to_currency("-1234567890.50", {:unit => "K&#269;", :format => "%n %u", :negative_format => "%n - %u"}))
+ assert_equal("0.00", number_helper.number_to_currency(+0.0, {:unit => "", :negative_format => "(%n)"}))
+ assert_equal("(0.00)", number_helper.number_to_currency(-0.0, {:unit => "", :negative_format => "(%n)"}))
end
end