Skip to content

Commit

Permalink
Merge pull request #10763 from senny/10758_to_sentence_with_blank_ele…
Browse files Browse the repository at this point in the history
…ments

test-case for `Array#to_sentence` with `blank?` items.
  • Loading branch information
carlosantoniodasilva committed May 26, 2013
2 parents 50e8937 + 27b8a99 commit c3890d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions activesupport/test/core_ext/array_ext_test.rb
Expand Up @@ -96,6 +96,10 @@ def test_does_not_modify_given_hash
assert_equal "one two, and three", ['one', 'two', 'three'].to_sentence(options) assert_equal "one two, and three", ['one', 'two', 'three'].to_sentence(options)
assert_equal({ words_connector: ' ' }, options) assert_equal({ words_connector: ' ' }, options)
end end

def test_with_blank_elements
assert_equal ", one, , two, and three", [nil, 'one', '', 'two', 'three'].to_sentence
end
end end


class ArrayExtToSTests < ActiveSupport::TestCase class ArrayExtToSTests < ActiveSupport::TestCase
Expand Down

0 comments on commit c3890d3

Please sign in to comment.