Sha256: 6fde36bd43a010d7b768f0bf22f052a84bccf46f119a13937433aa46bc9912ff

Contents?: true

Size: 1.09 KB

Versions: 80

Compression:

Stored size: 1.09 KB

Contents

$KCODE = 'u' if RUBY_VERSION <= '1.9'

require 'minitest/autorun'
TEST_CASE = defined?(Minitest::Test) ? Minitest::Test : MiniTest::Unit::TestCase

# TODO: Remove these aliases and update tests accordingly.
class TEST_CASE
  alias :assert_raise :assert_raises
  alias :assert_not_equal :refute_equal

  def assert_nothing_raised(*args)
    yield
  end
end

require 'bundler/setup'
require 'i18n'
require 'mocha/setup'
require 'test_declarative'

class I18n::TestCase < TEST_CASE
  def self.key_value?
    defined?(ActiveSupport)
  end

  def setup
    super
    I18n.enforce_available_locales = false
  end

  def teardown
    I18n.locale = nil
    I18n.default_locale = nil
    I18n.load_path = nil
    I18n.available_locales = nil
    I18n.backend = nil
    I18n.default_separator = nil
    I18n.enforce_available_locales = true
    super
  end

  protected

  def translations
    I18n.backend.instance_variable_get(:@translations)
  end

  def store_translations(locale, data)
    I18n.backend.store_translations(locale, data)
  end

  def locales_dir
    File.dirname(__FILE__) + '/test_data/locales'
  end
end

Version data entries

80 entries across 74 versions & 18 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.2.0.0 vendor/bundle/ruby/2.5.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.1.4.0 vendor/bundle/ruby/2.5.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.1.2.0 vendor/bundle/ruby/2.3.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.1.1.0 vendor/bundle/ruby/2.5.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.0.4.0 vendor/bundle/ruby/2.5.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.0.3.0 vendor/bundle/ruby/2.5.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.4.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.5.0/gems/i18n-0.8.0/test/test_helper.rb
pract6-0.1.0 .gem/ruby/2.3.0/gems/i18n-0.8.6/test/test_helper.rb
vagrant-unbundled-2.0.1.0 vendor/bundle/ruby/2.4.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-2.0.0.1 vendor/bundle/ruby/2.4.0/gems/i18n-0.8.0/test/test_helper.rb
vagrant-unbundled-1.9.8.1 vendor/bundle/ruby/2.4.0/gems/i18n-0.8.0/test/test_helper.rb