Class: I18nSimpleBackendLookupTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
I18nSimpleBackendTestSetup
Defined in:
lib/vendor/i18n/test/simple_backend_test.rb

Instance Method Summary collapse

Methods included from I18nSimpleBackendTestSetup

#add_datetime_translations, #backend_get_translations, #setup_backend

Instance Method Details

#test_lookup_given_nested_keys_looks_up_a_nested_hash_valueObject



199
200
201
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 199

def test_lookup_given_nested_keys_looks_up_a_nested_hash_value
  assert_equal 'bar', @backend.send(:lookup, 'en', :bar, [:foo])
end

#test_lookup_given_nil_as_a_key_returns_nilObject

useful because this way we can use the backend with no key for interpolation/pluralization



195
196
197
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 195

def test_lookup_given_nil_as_a_key_returns_nil
  assert_nil @backend.send(:lookup, 'en', nil)
end