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-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/i18n-0.7.0/test/test_helper.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/i18n-0.7.0/test/test_helper.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/i18n-0.7.0/test/test_helper.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/i18n-0.7.0/test/test_helper.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/i18n-0.7.0/test/test_helper.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/i18n-0.7.0/test/test_helper.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/i18n-0.7.0/test/test_helper.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/i18n-0.7.0/test/test_helper.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/i18n-0.7.0/test/test_helper.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/i18n-0.7.0/test/test_helper.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/i18n-0.7.0/test/test_helper.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/i18n-0.7.0/test/test_helper.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/i18n-0.7.0/test/test_helper.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/i18n-0.7.0/test/test_helper.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/i18n-0.7.0/test/test_helper.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/i18n-0.7.0/test/test_helper.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/i18n-0.7.0/test/test_helper.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/i18n-0.7.0/test/test_helper.rb
i18n-0.7.0 test/test_helper.rb
i18n-0.7.0.beta1 test/test_helper.rb