1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

add test-case for `Array#to_sentence with blank items.

This commit is contained in:
Yves Senn 2013-05-26 18:47:23 +02:00
parent ab28bafc9f
commit 27b8a99263

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