Class: I18nSimpleBackendReloadTranslationsTest
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- I18nSimpleBackendReloadTranslationsTest
show all
- Includes:
- I18nSimpleBackendTestSetup
- Defined in:
- lib/vendor/i18n/test/simple_backend_test.rb
Instance Method Summary
collapse
#add_datetime_translations, #backend_get_translations, #setup_backend
Instance Method Details
#setup ⇒ Object
544
545
546
547
548
549
|
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 544
def setup
@backend = I18n::Backend::Simple.new
I18n.load_path = [File.dirname(__FILE__) + '/locale/en.yml']
assert_nil backend_get_translations
@backend.send :init_translations
end
|
#teardown ⇒ Object
551
552
553
|
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 551
def teardown
I18n.load_path = []
end
|
#test_reload_translations_uninitializes_translations ⇒ Object
564
565
566
567
|
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 564
def test_reload_translations_uninitializes_translations
@backend.reload!
assert_equal @backend.initialized?, false
end
|
#test_reload_translations_unloads_translations ⇒ Object
559
560
561
562
|
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 559
def test_reload_translations_unloads_translations
@backend.reload!
assert_nil backend_get_translations
end
|
#test_setup ⇒ Object
555
556
557
|
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 555
def test_setup
assert_not_nil backend_get_translations
end
|