diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/number_helper_i18n_test.rb | 7 | ||||
-rw-r--r-- | activesupport/test/number_helper_test.rb | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/test/number_helper_i18n_test.rb b/activesupport/test/number_helper_i18n_test.rb index 4d0d5e8631..65aecece71 100644 --- a/activesupport/test/number_helper_i18n_test.rb +++ b/activesupport/test/number_helper_i18n_test.rb @@ -56,6 +56,13 @@ module ActiveSupport assert_equal("-$10.00", number_to_currency(-10, :locale => 'empty')) end + def test_locale_default_format_has_precedence_over_helper_defaults + I18n.backend.store_translations 'ts', + { :number => { :format => { :separator => ";" } } } + + assert_equal("&$ - 10;00", number_to_currency(10, :locale => 'ts')) + end + def test_number_to_currency_without_currency_negative_format I18n.backend.store_translations 'no_negative_format', :number => { :currency => { :format => { :unit => '@', :format => '%n %u' } } diff --git a/activesupport/test/number_helper_test.rb b/activesupport/test/number_helper_test.rb index f26d75edfb..5f54587f93 100644 --- a/activesupport/test/number_helper_test.rb +++ b/activesupport/test/number_helper_test.rb @@ -369,7 +369,6 @@ module ActiveSupport assert number_helper.respond_to?(:valid_float?, true) end end - end end end |