Sha256: 7d719b14961963192733093ba0d84511449c32538979025650927ad9108d6725
Contents?: true
Size: 827 Bytes
Versions: 7
Compression:
Stored size: 827 Bytes
Contents
# encoding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/../../test_helper') class I18nSimpleBackendLookupTest < Test::Unit::TestCase include Tests::Backend::Simple::Setup::Base # useful because this way we can use the backend with no key for interpolation/pluralization def test_lookup_given_nil_as_a_key_returns_nil assert_nil I18n.backend.send(:lookup, :en, nil) end def test_lookup_given_nested_keys_looks_up_a_nested_hash_value assert_equal 'bar', I18n.backend.send(:lookup, :en, :bar, [:foo]) end def test_lookup_using_a_custom_separator assert_equal 'bar', I18n.backend.send(:lookup, :en, 'foo|bar', [], '|') end def test_default_using_a_custom_separator assert_equal 'bar', I18n.backend.send(:default, :en, :'does_not_exist', :'foo|bar', :separator => '|') end end
Version data entries
7 entries across 7 versions & 3 rubygems