Sha256: f60e6d1ca8916356fa9dbd835466d11fe4537848ed8f8f8472ae3d5b1e77d238

Contents?: true

Size: 419 Bytes

Versions: 7

Compression:

Stored size: 419 Bytes

Contents

# encoding: utf-8

shared_context "preloaded translations" do

  around do |example|

    load_path = Dir[File.expand_path "../*.yml", __FILE__]

    old_locale, I18n.locale = I18n.locale, :en
    old_path, I18n.load_path = I18n.load_path, load_path
    I18n.backend.load_translations

    example.run

    I18n.locale    = old_locale
    I18n.load_path = old_path
    I18n.backend.reload!

  end

end # shared context

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
assertion-0.2.5 spec/shared/i18n.rb
assertion-0.2.4 spec/shared/i18n.rb
assertion-0.2.3 spec/shared/i18n.rb
assertion-0.2.2 spec/shared/i18n.rb
assertion-0.2.1 spec/shared/i18n.rb
assertion-0.2.0 spec/shared/i18n.rb
assertion-0.1.0 spec/shared/i18n.rb