Permalink
Browse files

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

  • Loading branch information...
1 parent ab28baf commit 27b8a9926310abe93110a7985031573fbd5845ab @senny senny committed May 26, 2013
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 27b8a99

Please sign in to comment.