Skip to content

Commit 3a74796

Browse files
committed
Merge pull request carrierwaveuploader#145 from repinel/fix-locale-tests
Fix future builds since i18n has change
2 parents f077e8e + 0a28d52 commit 3a74796

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spec/spec_helper.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,16 @@ def stub_tempfile(filename, mime_type=nil, fake_name=nil)
4646
module I18nHelpers
4747
def change_locale_and_store_translations(locale, translations, &block)
4848
current_locale = I18n.locale
49+
current_enforce = I18n.config.enforce_available_locales
4950
begin
51+
I18n.config.enforce_available_locales = false
5052
I18n.backend.store_translations locale, translations
5153
I18n.locale = locale
5254
yield
5355
ensure
5456
I18n.reload!
5557
I18n.locale = current_locale
58+
I18n.config.enforce_available_locales = current_enforce
5659
end
5760
end
5861
end

0 commit comments

Comments
 (0)