diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-11-14 13:16:00 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-11-14 13:16:00 -0500 |
commit | 7c1566b2789c779acfeba34a7d86ab5ca5e2c0bd (patch) | |
tree | 60e1581f104b36df5dc7398df1fd8fddd5e28d75 /activesupport/test/core_ext/array | |
parent | 5f3222155957e887516ffd4be58c4743553415b5 (diff) | |
download | rails-7c1566b2789c779acfeba34a7d86ab5ca5e2c0bd.tar.gz rails-7c1566b2789c779acfeba34a7d86ab5ca5e2c0bd.tar.bz2 rails-7c1566b2789c779acfeba34a7d86ab5ca5e2c0bd.zip |
Revert "Merge pull request #25811 from oss92/to_sentence_fallback_string"
This reverts commit bad3a120f1690f393d8f6204b3ceee60f0ce707b, reversing
changes made to 2384317465ccb1dfca456a2b7798714b99f32711.
Reason: Adding a new option in the API for something that can be done
with a `#presence` check could do.
Diffstat (limited to 'activesupport/test/core_ext/array')
-rw-r--r-- | activesupport/test/core_ext/array/conversions_test.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/activesupport/test/core_ext/array/conversions_test.rb b/activesupport/test/core_ext/array/conversions_test.rb index 469efcd934..29e661a99b 100644 --- a/activesupport/test/core_ext/array/conversions_test.rb +++ b/activesupport/test/core_ext/array/conversions_test.rb @@ -25,11 +25,6 @@ class ToSentenceTest < ActiveSupport::TestCase assert_equal "one, two and three", ["one", "two", "three"].to_sentence(last_word_connector: " and ") end - def test_to_sentence_with_fallback_string - assert_equal "none", [].to_sentence(fallback_string: "none") - assert_equal "one, two, and three", ["one", "two", "three"].to_sentence(fallback_string: "none") - end - def test_two_elements assert_equal "one and two", ["one", "two"].to_sentence assert_equal "one two", ["one", "two"].to_sentence(two_words_connector: " ") @@ -63,7 +58,7 @@ class ToSentenceTest < ActiveSupport::TestCase ["one", "two"].to_sentence(passing: "invalid option") end - assert_equal exception.message, "Unknown key: :passing. Valid keys are: :words_connector, :two_words_connector, :last_word_connector, :locale, :fallback_string" + assert_equal exception.message, "Unknown key: :passing. Valid keys are: :words_connector, :two_words_connector, :last_word_connector, :locale" end def test_always_returns_string |