Merge pull request #10763 from senny/10758_to_sentence_with_blank_elements

test-case for `Array#to_sentence` with `blank?` items.
This commit is contained in:
Carlos Antonio da Silva 2013-05-26 13:51:49 -07:00
commit c3890d38cb
1 changed files with 4 additions and 0 deletions

View File

@ -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