Class: I18nSimpleBackendReloadTranslationsTest
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- I18nSimpleBackendReloadTranslationsTest
show all
- Includes:
- I18nSimpleBackendTestSetup
- Defined in:
- lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb
Instance Method Summary
collapse
#add_datetime_translations, #backend_get_translations, #setup_backend
Instance Method Details
543
544
545
546
547
548
|
# File 'lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb', line 543
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
|
550
551
552
|
# File 'lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb', line 550
def teardown
I18n.load_path = []
end
|
#test_reload_translations_uninitializes_translations ⇒ Object
563
564
565
566
|
# File 'lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb', line 563
def test_reload_translations_uninitializes_translations
@backend.reload!
assert_equal @backend.initialized?, false
end
|
#test_reload_translations_unloads_translations ⇒ Object
558
559
560
561
|
# File 'lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb', line 558
def test_reload_translations_unloads_translations
@backend.reload!
assert_nil backend_get_translations
end
|
#test_setup ⇒ Object
554
555
556
|
# File 'lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb', line 554
def test_setup
assert_not_nil backend_get_translations
end
|