Class: I18nSimpleBackendApiInterpolateTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
Tests::Backend::Api::Interpolation, Tests::Backend::Simple::Setup::Base
Defined in:
lib/vendor/i18n/test/backend/simple/api_test.rb

Instance Method Summary collapse

Methods included from Tests::Backend::Api::Interpolation

#interpolate, #test_interpolate_given_a_non_unicode_multibyte_value_hash_interpolates_into_a_string_with_the_same_encoding, #test_interpolate_given_a_non_unicode_multibyte_value_hash_into_an_unicode_string_raises_encoding_compatibility_error, #test_interpolate_given_a_string_containing_a_reserved_key_raises_reserved_interpolation_key, #test_interpolate_given_a_unicode_value_hash_interpolates_into_unicode_string, #test_interpolate_given_a_unicode_value_hash_interpolates_to_the_string, #test_interpolate_given_a_unicode_value_hash_into_a_non_unicode_multibyte_string_raises_encoding_compatibility_error, #test_interpolate_given_a_value_hash_interpolates_into_unicode_string, #test_interpolate_with_ruby_1_9_syntax, #test_interpolation_does_not_raise_missing_interpolation_argument_exceptions_for_escaped_variables, #test_interpolation_given_a_lambda_as_a_value_it_calls_it_when_the_string_contains_the_key, #test_interpolation_given_a_lambda_as_a_value_it_does_not_call_it_when_the_string_does_not_contain_the_key, #test_interpolation_given_interpolation_values_but_missing_a_key_it_raises_a_missing_interpolation_argument_exception, #test_interpolation_given_interpolation_values_it_interpolates_the_values_to_the_string, #test_interpolation_given_interpolation_values_with_nil_values_it_interpolates_the_values_to_the_string, #test_interpolation_given_no_interpolation_values_it_does_not_alter_the_string

Methods included from Tests::Backend::Simple::Setup::Base

#setup, #teardown

Instance Method Details

#test_interpolate_given_an_non_string_as_a_string_returns_nilObject



51
52
53
# File 'lib/vendor/i18n/test/backend/simple/api_test.rb', line 51

def test_interpolate_given_an_non_string_as_a_string_returns_nil
  assert_equal [], I18n.backend.send(:interpolate, nil, [], :name => 'David')
end

#test_interpolate_given_nil_as_a_string_returns_nilObject

implementation specific tests



47
48
49
# File 'lib/vendor/i18n/test/backend/simple/api_test.rb', line 47

def test_interpolate_given_nil_as_a_string_returns_nil
  assert_nil I18n.backend.send(:interpolate, nil, nil, :name => 'David')
end