diff options
author | Juan Barreneche <snipperme@gmail.com> | 2013-03-14 18:02:20 -0300 |
---|---|---|
committer | Juan Manuel Barreneche <snipperme@gmail.com> | 2013-03-16 21:27:13 -0300 |
commit | cecbf5dd4d814f0bbd6a7c77a7c550c90a75cf47 (patch) | |
tree | e0ee7bb041b2728ca27ca83a85d8c51c4d11278e /actionpack/test/controller/localized_templates_test.rb | |
parent | feaa6e2048fe86bcf07e967d6e47b865e42e055b (diff) | |
download | rails-cecbf5dd4d814f0bbd6a7c77a7c550c90a75cf47.tar.gz rails-cecbf5dd4d814f0bbd6a7c77a7c550c90a75cf47.tar.bz2 rails-cecbf5dd4d814f0bbd6a7c77a7c550c90a75cf47.zip |
Include I18n fallbacks in :locale lookup context
Diffstat (limited to 'actionpack/test/controller/localized_templates_test.rb')
-rw-r--r-- | actionpack/test/controller/localized_templates_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/localized_templates_test.rb b/actionpack/test/controller/localized_templates_test.rb index bac1d02977..6b02eedaed 100644 --- a/actionpack/test/controller/localized_templates_test.rb +++ b/actionpack/test/controller/localized_templates_test.rb @@ -25,4 +25,13 @@ class LocalizedTemplatesTest < ActionController::TestCase ensure I18n.locale = old_locale end + + def test_use_fallback_locales + I18n.locale = :"de-AT" + I18n.backend.class.send(:include, I18n::Backend::Fallbacks) + I18n.fallbacks[:"de-AT"] = [:de] + + get :hello_world + assert_equal "Gutten Tag", @response.body + end end |