Sha256: 2f1005cb297be067609b594d10991a6402a30ed87e046b1e6a748d68507159f6
Contents?: true
Size: 721 Bytes
Versions: 3
Compression:
Stored size: 721 Bytes
Contents
# encoding: utf-8 RSpec.describe Loaf::Translation do before { I18n.backend = I18n::Backend::Simple.new } after { I18n.backend.reload! } it 'translates breadcrumb title' do I18n.backend.store_translations 'en', loaf: { breadcrumbs: { home: 'Home'}} expect(described_class.find_title('home')).to eql('Home') end it 'does not translates breadcrumb name with missing scope' do I18n.backend.store_translations 'en', breadcrumbs: {home: 'Home'} expect(described_class.find_title('home')).to eql('home') end it 'translates breadcrumb name using default option' do expect(described_class.find_title('home', default: 'breadcrumb default name')).to eql('breadcrumb default name') end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
loaf-0.7.0 | spec/unit/translation_spec.rb |
loaf-0.6.2 | spec/unit/translation_spec.rb |
loaf-0.6.1 | spec/unit/translation_spec.rb |