Fix flaky spec for translations
This spec was causing a side effect on another spec[2], making it fail 😌 I think it was because no translation had been called yet, in the failing spec, and so the the i18n backend translations had not been initialized, and was always returning empty translations for any locale. This might have been due to tampering with translations in the this newly introduced spec. By forcing translations to load after this new spec, the other spec passes again [2] https://github.com/AyuntamientoMadrid/consul/blob/master/spec/features/localization_spec.rb#L20
This commit is contained in:
@@ -13,6 +13,7 @@ describe LocalesHelper do
|
||||
after do
|
||||
I18n.backend.reload!
|
||||
I18n.enforce_available_locales = default_enforce
|
||||
I18n.backend.send(:init_translations)
|
||||
end
|
||||
|
||||
it "returns the language name in i18n.language.name translation" do
|
||||
@@ -29,4 +30,4 @@ describe LocalesHelper do
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user