diff options
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | actionpack/test/template/number_helper_i18n_test.rb | 10 |
2 files changed, 6 insertions, 6 deletions
@@ -22,7 +22,7 @@ end gem 'uglifier', '>= 1.0.3', :require => false gem 'rake', '>= 0.8.7' -gem 'mocha', '>= 0.13.0', :require => false +gem 'mocha', '~> 0.14', :require => false group :doc do # The current sdoc cannot generate GitHub links due diff --git a/actionpack/test/template/number_helper_i18n_test.rb b/actionpack/test/template/number_helper_i18n_test.rb index d6e9de9555..5a3250e949 100644 --- a/actionpack/test/template/number_helper_i18n_test.rb +++ b/actionpack/test/template/number_helper_i18n_test.rb @@ -7,7 +7,7 @@ class NumberHelperTest < ActionView::TestCase I18n.backend.store_translations 'ts', :number => { :format => { :precision => 3, :delimiter => ',', :separator => '.', :significant => false, :strip_insignificant_zeros => false }, - :currency => { :format => { :unit => '&$', :format => '%u - %n', :negative_format => '(%u - %n)', :precision => 2 } }, + :currency => { :format => { :unit => '$$$', :format => '%u - %n', :negative_format => '(%u - %n)', :precision => 2 } }, :human => { :format => { :precision => 2, @@ -42,9 +42,9 @@ class NumberHelperTest < ActionView::TestCase end def test_number_to_i18n_currency - assert_equal("&$ - 10.00", number_to_currency(10, :locale => 'ts')) - assert_equal("(&$ - 10.00)", number_to_currency(-10, :locale => 'ts')) - assert_equal("-10.00 - &$", number_to_currency(-10, :locale => 'ts', :format => "%n - %u")) + assert_equal("$$$ - 10.00", number_to_currency(10, :locale => 'ts')) + assert_equal("($$$ - 10.00)", number_to_currency(-10, :locale => 'ts')) + assert_equal("-10.00 - $$$", number_to_currency(-10, :locale => 'ts', :format => "%n - %u")) end def test_number_to_currency_with_clean_i18n_settings @@ -53,7 +53,7 @@ class NumberHelperTest < ActionView::TestCase assert_equal("-$10.00", number_to_currency(-10)) end end - + def test_number_to_currency_without_currency_negative_format clean_i18n do I18n.backend.store_translations 'ts', :number => { :currency => { :format => { :unit => '@', :format => '%n %u' } } } |