diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-03-17 22:08:25 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-03-17 22:08:25 +0000 |
commit | 3c0fd445c0a36c36cbd8c4259a28a978a8e8eb83 (patch) | |
tree | 1beb8324cbf9349d7832e76838bc0d0f30065d0a /actionpack/test | |
parent | 75d98db73d053641d24a7356345766b0a7659de0 (diff) | |
download | rails-3c0fd445c0a36c36cbd8c4259a28a978a8e8eb83.tar.gz rails-3c0fd445c0a36c36cbd8c4259a28a978a8e8eb83.tar.bz2 rails-3c0fd445c0a36c36cbd8c4259a28a978a8e8eb83.zip |
Added :format option to NumberHelper#number_to_currency to enable better localization support #11149 [lylo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9052 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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 29cb9c1701..00e5bd6461 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -25,6 +25,7 @@ class NumberHelperTest < Test::Unit::TestCase assert_equal("$1,234,567,890.5", number_to_currency(1234567890.50, {:precision => 1})) assert_equal("£1234567890,50", number_to_currency(1234567890.50, {:unit => "£", :separator => ",", :delimiter => ""})) assert_equal("$1,234,567,890.50", number_to_currency("1234567890.50")) + assert_equal("1,234,567,890.50 Kč", number_to_currency("1234567890.50", {:unit => "Kč", :format => "%n %u"})) assert_equal("$x.", number_to_currency("x")) assert_nil number_to_currency(nil) end |