Sha256: 89f5d17fbdd9f742152cbb131367b3c634ef6a93b5102e72eb996ce1f9e3cec0

Contents?: true

Size: 695 Bytes

Versions: 9

Compression:

Stored size: 695 Bytes

Contents

require 'spec_helper'

describe ExvoGlobalize do

  let(:i18n_header) { Factory(:i18n_header) }

  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_header.value.should eql(I18n.translate(:header))
    end

    it "uses translation from the Simple backend if it is not found in the GlobalizeTranslation backend" do
      I18n.backend.simple.translate(I18n.default_locale, :name).should eql(I18n.translate(:name))
    end

    after { I18n.locale = I18n.default_locale }

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
exvo_globalize-0.5.3 spec/exvo_globalize/fallback_spec.rb
exvo_globalize-0.5.2 spec/exvo_globalize/fallback_spec.rb
exvo_globalize-0.5.1 spec/exvo_globalize/fallback_spec.rb
exvo_globalize-0.5.0 spec/exvo_globalize/fallback_spec.rb
exvo_globalize-0.4.0 spec/exvo_globalize/fallback_spec.rb
exvo_globalize-0.3.2 spec/exvo_globalize/fallback_spec.rb
exvo_globalize-0.3.1 spec/exvo_globalize/fallback_spec.rb
exvo_globalize-0.3.0 spec/exvo_globalize/fallback_spec.rb
exvo_globalize-0.2.1 spec/exvo_globalize/fallback_spec.rb