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:
parent
ab28bafc9f
commit
27b8a99263
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue