Sha256: a7baa33b0b11451efa581fa6076893d29c8ff05f45115062b45b46285999ded6
Contents?: true
Size: 1.51 KB
Versions: 1
Compression:
Stored size: 1.51 KB
Contents
module Tests module Backend module Api module Link def test_translate_calls_translate_if_resolves_to_a_symbol setup_linked_translations assert_equal 'foo', I18n.backend.translate('en', :link_to_foo) end def test_translate_calls_translate_if_resolves_to_a_symbol2 setup_linked_translations assert_equal('baz', I18n.backend.translate('en', :link_to_baz)) end def test_translate_calls_translate_if_resolves_to_a_symbol3 setup_linked_translations assert I18n.backend.translate('en', :link_to_bar).key?(:baz) end def test_translate_calls_translate_if_resolves_to_a_symbol_with_scope_1 setup_linked_translations assert_equal('baz', I18n.backend.translate('en', :link_to_baz, :scope => :bar)) end def test_translate_calls_translate_if_resolves_to_a_symbol_with_scope_1 setup_linked_translations assert_equal('buz', I18n.backend.translate('en', :'bar.link_to_buz')) end private def setup_linked_translations I18n.backend.store_translations 'en', { :foo => 'foo', :bar => { :baz => 'baz', :link_to_baz => :baz, :link_to_buz => :'boz.buz' }, :boz => { :buz => 'buz' }, :link_to_foo => :foo, :link_to_bar => :bar, :link_to_baz => :'bar.baz' } end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
i18n-0.2.0 | test/api/link.rb |