Class: I18nSimpleBackendLookupTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
I18nSimpleBackendTestSetup
Defined in:
lib/active_support/vendor/i18n-0.1.3/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/active_support/vendor/i18n-0.1.3/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/active_support/vendor/i18n-0.1.3/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