aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/array_ext_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/core_ext/array_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/array_ext_test.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/array_ext_test.rb b/activesupport/test/core_ext/array_ext_test.rb
index 2ee86c8af9..159dc2a478 100644
--- a/activesupport/test/core_ext/array_ext_test.rb
+++ b/activesupport/test/core_ext/array_ext_test.rb
@@ -19,7 +19,15 @@ class ArrayExtConversionTests < Test::Unit::TestCase
end
def test_to_sentence_with_connector
- assert_equal "one, two, and also three", ['one', 'two', 'three'].to_sentence('and also')
+ assert_equal "one, two, and also three", ['one', 'two', 'three'].to_sentence(:connector => 'and also')
+ end
+
+ def test_to_sentence_with_skip_last_comma
+ assert_equal "one, two and three", ['one', 'two', 'three'].to_sentence(:skip_last_comma => true)
+ end
+
+ def test_two_elements
+ assert_equal "one and two", ['one', 'two'].to_sentence
end
def test_one_element