Sha256: b98c5c63d7c3c2ac2b0f0051ff46b27db32de8b7a647652e1c41e1fc59f8865a
Contents?: true
Size: 850 Bytes
Versions: 2
Compression:
Stored size: 850 Bytes
Contents
require 'spec_helper' describe ExvoGlobalize do I18n.load_path = ['spec/fixtures/locales/en.yml'] let(:i18n_example) { Factory(:i18n_example) } context "locale fallbacks" do before { I18n.locale = :pt } it "has set a different locale than the default one" do I18n.locale.should_not be_eql(I18n.default_locale) end it "uses translation from the GlobalizeStore backend" do i18n_example.value.should eql(I18n.translate(:example)) end it "uses translation from the Simple backend if it is not found in the GlobalizeTranslation backend" do simple_backend = I18n.backend.backends.detect { |backend| backend.is_a?(I18n::Backend::Simple) } simple_backend.translate(I18n.default_locale, :name).should eql(I18n.translate(:name)) end after { I18n.locale = I18n.default_locale } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
exvo_globalize-0.1.0 | spec/integration/locale_fallback_spec.rb |
exvo_globalize-0.0.2 | spec/integration/locale_fallback_spec.rb |