aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-05-26 18:47:23 +0200
committerYves Senn <yves.senn@gmail.com>2013-05-26 18:47:23 +0200
commit27b8a9926310abe93110a7985031573fbd5845ab (patch)
tree464e9b844dd718d32dd6cd418b8525a48f27f2f2 /activesupport/test
parentab28bafc9f1118652f5090fa1260923118930518 (diff)
downloadrails-27b8a9926310abe93110a7985031573fbd5845ab.tar.gz
rails-27b8a9926310abe93110a7985031573fbd5845ab.tar.bz2
rails-27b8a9926310abe93110a7985031573fbd5845ab.zip
add test-case for `Array#to_sentence with blank items.
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/array_ext_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/array_ext_test.rb b/activesupport/test/core_ext/array_ext_test.rb
index efa7582ab0..384064d81f 100644
--- a/activesupport/test/core_ext/array_ext_test.rb
+++ b/activesupport/test/core_ext/array_ext_test.rb
@@ -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