diff options
author | José Valim <jose.valim@gmail.com> | 2009-02-06 23:23:50 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-02-06 23:23:50 -0600 |
commit | 24f2e676f700b8a387c6f4c27acf172658cd7863 (patch) | |
tree | 5b664014391c3e8a5828e02492cea72d356358bc /actionpack/test/template | |
parent | 43c09383cefbc3b62e9b124792fb0d0278689d2b (diff) | |
download | rails-24f2e676f700b8a387c6f4c27acf172658cd7863.tar.gz rails-24f2e676f700b8a387c6f4c27acf172658cd7863.tar.bz2 rails-24f2e676f700b8a387c6f4c27acf172658cd7863.zip |
Added support to dashed locales in templates localization [#1888 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/render_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb index 2caf4e8fe4..5586434cb6 100644 --- a/actionpack/test/template/render_test.rb +++ b/actionpack/test/template/render_test.rb @@ -10,6 +10,7 @@ module RenderTestCases # Reload and register danish language for testing I18n.reload! I18n.backend.store_translations 'da', {} + I18n.backend.store_translations 'pt-BR', {} # Ensure original are still the same since we are reindexing view paths assert_equal ORIGINAL_LOCALES, I18n.available_locales.map(&:to_s).sort @@ -35,6 +36,14 @@ module RenderTestCases I18n.locale = old_locale end + def test_render_file_with_dashed_locale + old_locale = I18n.locale + I18n.locale = :"pt-BR" + assert_equal "Ola mundo", @view.render(:file => "test/hello_world") + ensure + I18n.locale = old_locale + end + def test_render_file_at_top_level assert_equal 'Elastica', @view.render(:file => '/shared') end |