Class: I18nSimpleBackendTranslationsTest
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- I18nSimpleBackendTranslationsTest
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
#test_store_translations_adds_translations ⇒ Object
104
105
106
107
|
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 104
def test_store_translations_adds_translations @backend.store_translations :'en', :foo => 'bar'
assert_equal Hash[:'en', {:foo => 'bar'}], backend_get_translations
end
|
#test_store_translations_converts_keys_to_symbols ⇒ Object
120
121
122
123
124
|
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 120
def test_store_translations_converts_keys_to_symbols
@backend.store_translations 'en', 'foo' => {'bar' => 'bar', 'baz' => 'baz'}
assert_equal Hash[:'en', {:foo => {:bar => 'bar', :baz => 'baz'}}], backend_get_translations
end
|
#test_store_translations_deep_merges_translations ⇒ Object
109
110
111
112
113
|
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 109
def test_store_translations_deep_merges_translations
@backend.store_translations :'en', :foo => {:bar => 'bar'}
@backend.store_translations :'en', :foo => {:baz => 'baz'}
assert_equal Hash[:'en', {:foo => {:bar => 'bar', :baz => 'baz'}}], backend_get_translations
end
|
#test_store_translations_forces_locale_to_sym ⇒ Object
115
116
117
118
|
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 115
def test_store_translations_forces_locale_to_sym
@backend.store_translations 'en', :foo => 'bar'
assert_equal Hash[:'en', {:foo => 'bar'}], backend_get_translations
end
|