diff options
author | Zuhao Wan <wanzuhao@gmail.com> | 2014-06-14 16:32:36 +0800 |
---|---|---|
committer | Zuhao Wan <wanzuhao@gmail.com> | 2014-06-14 16:36:53 +0800 |
commit | 48d118573d3a3b7fd5ba8c4fa02dc2f282a93b0e (patch) | |
tree | 1ae0d69c6e5fe93fca2cf848d753714c8ec2758b /actionview/test/template/translation_helper_test.rb | |
parent | 0c58eb02ef8b212c49256453392d93dbbd8f9527 (diff) | |
download | rails-48d118573d3a3b7fd5ba8c4fa02dc2f282a93b0e.tar.gz rails-48d118573d3a3b7fd5ba8c4fa02dc2f282a93b0e.tar.bz2 rails-48d118573d3a3b7fd5ba8c4fa02dc2f282a93b0e.zip |
Clean up I18n stored translations after test.
Diffstat (limited to 'actionview/test/template/translation_helper_test.rb')
-rw-r--r-- | actionview/test/template/translation_helper_test.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionview/test/template/translation_helper_test.rb b/actionview/test/template/translation_helper_test.rb index a9d5ea7345..41f6770f23 100644 --- a/actionview/test/template/translation_helper_test.rb +++ b/actionview/test/template/translation_helper_test.rb @@ -6,7 +6,7 @@ class TranslationHelperTest < ActiveSupport::TestCase attr_reader :request, :view - def setup + setup do I18n.backend.store_translations(:en, :translations => { :templates => { @@ -30,6 +30,10 @@ class TranslationHelperTest < ActiveSupport::TestCase @view = ::ActionView::Base.new(ActionController::Base.view_paths, {}) end + teardown do + I18n.backend.reload! + end + def test_delegates_to_i18n_setting_the_rescue_format_option_to_html I18n.expects(:translate).with(:foo, :locale => 'en', :raise=>true).returns("") translate :foo, :locale => 'en' |