Class: I18nGettextBackendTest
- Defined in:
- lib/vendor/i18n/test/gettext/backend_test.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #teardown ⇒ Object
- #test_backend_loads_po_file ⇒ Object
- #test_looks_up_translation ⇒ Object
- #test_pluralizes_entry ⇒ Object
Instance Method Details
#setup ⇒ Object
10 11 12 13 14 |
# File 'lib/vendor/i18n/test/gettext/backend_test.rb', line 10 def setup I18n.locale = :en I18n.load_path = [locales_dir + '/de.po'] I18n.backend..send(:include, I18n::Backend::Gettext) end |
#teardown ⇒ Object
16 17 18 19 |
# File 'lib/vendor/i18n/test/gettext/backend_test.rb', line 16 def teardown I18n.load_path = nil I18n.backend = nil end |
#test_backend_loads_po_file ⇒ Object
21 22 23 24 |
# File 'lib/vendor/i18n/test/gettext/backend_test.rb', line 21 def test_backend_loads_po_file I18n.backend.send(:init_translations) assert I18n.backend.send(:translations)[:de][:"Axis\001Axis"] end |