spec/unit/translation_spec.rb in loaf-0.7.0 vs spec/unit/translation_spec.rb in loaf-0.8.0

- old
+ new

@@ -4,9 +4,17 @@ before { I18n.backend = I18n::Backend::Simple.new } after { I18n.backend.reload! } + it "doesn't translate empty title" do + expect(described_class.find_title('')).to eql('') + end + + it "skips translation if doesn't find a matching scope" do + expect(described_class.find_title('unknown')).to eql('unknown') + end + it 'translates breadcrumb title' do I18n.backend.store_translations 'en', loaf: { breadcrumbs: { home: 'Home'}} expect(described_class.find_title('home')).to eql('Home') end