diff options
author | Mark Longair <mhl@pobox.com> | 2014-01-14 09:16:28 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2014-01-14 09:16:28 +0000 |
commit | bde6832d6cc9d98d48e50b0c13ac83ccfd78dd58 (patch) | |
tree | 2345425faba0449a269c6720956af2d377363284 /spec/spec_helper.rb | |
parent | ba1aa91fed2be17fe2951c598c7768a22a8d6f23 (diff) | |
parent | ef0594552843014c32a7f2e75e7bcd7a1e265156 (diff) |
Merge branch 'internal-admin-body-fix' into rails-3-develop
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1eeb8603b..52752dca5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -187,11 +187,16 @@ Spork.prefork do end end + # Reset the default locale, making sure that the previous default locale + # is also cleared from the fallbacks def with_default_locale(locale) original_default_locale = I18n.default_locale + original_fallbacks = I18n.fallbacks + I18n.fallbacks = nil I18n.default_locale = locale yield ensure + I18n.fallbacks = original_fallbacks I18n.default_locale = original_default_locale end |