diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-05-26 13:51:49 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-05-26 13:51:49 -0700 |
commit | c3890d38cbba97fd44f5b5a94f51ddb62a3ec71a (patch) | |
tree | b51fd85249ae6d6285e174c5fcf2c7fe9d273d1a /activesupport | |
parent | 50e89373c5e0b6ad2878346286277666752497b6 (diff) | |
parent | 27b8a9926310abe93110a7985031573fbd5845ab (diff) | |
download | rails-c3890d38cbba97fd44f5b5a94f51ddb62a3ec71a.tar.gz rails-c3890d38cbba97fd44f5b5a94f51ddb62a3ec71a.tar.bz2 rails-c3890d38cbba97fd44f5b5a94f51ddb62a3ec71a.zip |
Merge pull request #10763 from senny/10758_to_sentence_with_blank_elements
test-case for `Array#to_sentence` with `blank?` items.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/core_ext/array_ext_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/array_ext_test.rb b/activesupport/test/core_ext/array_ext_test.rb index efa7582ab0..384064d81f 100644 --- a/activesupport/test/core_ext/array_ext_test.rb +++ b/activesupport/test/core_ext/array_ext_test.rb @@ -96,6 +96,10 @@ class ArrayExtToSentenceTests < ActiveSupport::TestCase assert_equal "one two, and three", ['one', 'two', 'three'].to_sentence(options) assert_equal({ words_connector: ' ' }, options) end + + def test_with_blank_elements + assert_equal ", one, , two, and three", [nil, 'one', '', 'two', 'three'].to_sentence + end end class ArrayExtToSTests < ActiveSupport::TestCase |