Permalink
Browse files

Merge pull request #10763 from senny/10758_to_sentence_with_blank_ele…

…ments

test-case for `Array#to_sentence` with `blank?` items.
  • Loading branch information...
carlosantoniodasilva committed May 26, 2013
2 parents 50e8937 + 27b8a99 commit c3890d38cbba97fd44f5b5a94f51ddb62a3ec71a
Showing with 4 additions and 0 deletions.
  1. +4 −0 activesupport/test/core_ext/array_ext_test.rb
@@ -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({ 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

0 comments on commit c3890d3

Please sign in to comment.