Class: I18nSimpleBackendReloadTranslationsTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
Tests::Backend::Simple::Setup::Base
Defined in:
lib/vendor/i18n/test/backend/simple/translations_test.rb

Instance Method Summary collapse

Methods included from Tests::Backend::Simple::Setup::Base

#teardown

Instance Method Details

#setupObject



69
70
71
72
73
74
# File 'lib/vendor/i18n/test/backend/simple/translations_test.rb', line 69

def setup
  I18n.backend = I18n::Backend::Simple.new
  I18n.load_path = [locales_dir + '/en.yml']
  assert_nil backend_get_translations
  I18n.backend.send :init_translations
end

#test_reload_translations_uninitializes_translationsObject



85
86
87
88
# File 'lib/vendor/i18n/test/backend/simple/translations_test.rb', line 85

def test_reload_translations_uninitializes_translations
  I18n.backend.reload!
  assert_equal I18n.backend.initialized?, false
end

#test_reload_translations_unloads_translationsObject



80
81
82
83
# File 'lib/vendor/i18n/test/backend/simple/translations_test.rb', line 80

def test_reload_translations_unloads_translations
  I18n.backend.reload!
  assert_nil backend_get_translations
end

#test_setupObject



76
77
78
# File 'lib/vendor/i18n/test/backend/simple/translations_test.rb', line 76

def test_setup
  assert_not_nil backend_get_translations
end