spec/grape/exceptions/base_spec.rb in grape-1.2.4 vs spec/grape/exceptions/base_spec.rb in grape-1.2.5

- old
+ new

@@ -6,12 +6,15 @@ let(:key) { :invalid_formatter } let(:attributes) { { klass: String, to_format: 'xml' } } after do + I18n.enforce_available_locales = true I18n.available_locales = %i[en] + I18n.locale = :en I18n.default_locale = :en + I18n.reload! end context 'when I18n enforces available locales' do before { I18n.enforce_available_locales = true } @@ -27,9 +30,10 @@ end context 'when the fallback locale is not available' do before do I18n.available_locales = %i[de jp] + I18n.locale = :de I18n.default_locale = :de end it 'returns the translation string' do expect(subject).to eq("grape.errors.messages.#{key}")