Class: I18nSimpleBackendLookupTest
- Includes:
- Tests::Backend::Simple::Setup::Base
- Defined in:
- lib/vendor/i18n/test/backend/simple/lookup_test.rb
Instance Method Summary collapse
- #test_default_using_a_custom_separator ⇒ Object
- #test_lookup_given_nested_keys_looks_up_a_nested_hash_value ⇒ Object
-
#test_lookup_given_nil_as_a_key_returns_nil ⇒ Object
useful because this way we can use the backend with no key for interpolation/pluralization.
- #test_lookup_using_a_custom_separator ⇒ Object
Methods included from Tests::Backend::Simple::Setup::Base
Instance Method Details
#test_default_using_a_custom_separator ⇒ Object
21 22 23 |
# File 'lib/vendor/i18n/test/backend/simple/lookup_test.rb', line 21 def test_default_using_a_custom_separator assert_equal 'bar', I18n.backend.send(:default, :en, :'does_not_exist', :'foo|bar', :separator => '|') end |
#test_lookup_given_nested_keys_looks_up_a_nested_hash_value ⇒ Object
13 14 15 |
# File 'lib/vendor/i18n/test/backend/simple/lookup_test.rb', line 13 def test_lookup_given_nested_keys_looks_up_a_nested_hash_value assert_equal 'bar', I18n.backend.send(:lookup, :en, :bar, [:foo]) end |
#test_lookup_given_nil_as_a_key_returns_nil ⇒ Object
useful because this way we can use the backend with no key for interpolation/pluralization
9 10 11 |
# File 'lib/vendor/i18n/test/backend/simple/lookup_test.rb', line 9 def test_lookup_given_nil_as_a_key_returns_nil assert_nil I18n.backend.send(:lookup, :en, nil) end |