Sha256: 26ac93046d32644fbd08776909a906f02db579868cf00d0778b1b59f0fe02e4a
Contents?: true
Size: 781 Bytes
Versions: 4
Compression:
Stored size: 781 Bytes
Contents
# encoding: utf-8 require 'spec_helper' RSpec.describe 'Translation' do def translation I18n.t('activerecord.attributes.spree/address.zipcode') end context 'when current locale is en' do it 'translation is available' do I18n.locale = :en expect(translation).to eq 'Zip Code' end end # German is chosen as an example of language whose translations are found in a file. context 'when current locale is German' do it 'translation is available' do I18n.locale = :de expect(translation).to eq 'PLZ' end end # Chilean spanish is chosen context 'when current locale is Chilean Spanish' do it 'translation is available' do I18n.locale = :'es-CL' expect(translation).to eq 'Código Postal' end end end
Version data entries
4 entries across 4 versions & 1 rubygems