Methods
- S
- T
-
- test_abbr_day_names,
- test_abbr_month_names,
- test_date_localization_should_use_default_format,
- test_date_localization_with_default_format,
- test_date_localization_with_long_format,
- test_date_localization_with_short_format,
- test_date_order,
- test_day_names,
- test_last_word_connector,
- test_month_names,
- test_time_am,
- test_time_localization_should_use_default_format,
- test_time_localization_with_default_format,
- test_time_localization_with_long_format,
- test_time_localization_with_short_format,
- test_time_pm,
- test_time_zone_localization_with_default_format,
- test_to_sentence,
- test_two_words_connector,
- test_words_connector
Instance Public methods
setup()
Link
test_abbr_day_names()
Link
test_abbr_month_names()
Link
test_date_localization_should_use_default_format()
Link
test_date_localization_with_default_format()
Link
test_date_localization_with_long_format()
Link
test_date_localization_with_short_format()
Link
test_date_order()
Link
test_day_names()
Link
test_last_word_connector()
Link
test_month_names()
Link
test_time_am()
Link
test_time_localization_should_use_default_format()
Link
test_time_localization_with_default_format()
Link
test_time_localization_with_long_format()
Link
test_time_localization_with_short_format()
Link
test_time_pm()
Link
test_time_zone_localization_with_default_format()
Link
test_to_sentence()
Link
# File activesupport/test/i18n_test.rb, line 88 def test_to_sentence default_two_words_connector = I18n.translate(:'support.array.two_words_connector') default_last_word_connector = I18n.translate(:'support.array.last_word_connector') assert_equal 'a, b, and c', %w[a b c].to_sentence I18n.backend.store_translations 'en', :support => { :array => { :two_words_connector => ' & ' } } assert_equal 'a & b', %w[a b].to_sentence I18n.backend.store_translations 'en', :support => { :array => { :last_word_connector => ' and ' } } assert_equal 'a, b and c', %w[a b c].to_sentence ensure I18n.backend.store_translations 'en', :support => { :array => { :two_words_connector => default_two_words_connector } } I18n.backend.store_translations 'en', :support => { :array => { :last_word_connector => default_last_word_connector } } end
test_two_words_connector()
Link