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:
commit
c3890d38cb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue