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.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/array_ext_test.rb b/activesupport/test/core_ext/array_ext_test.rb
index d14ae39737..d7ab3ce605 100644
--- a/activesupport/test/core_ext/array_ext_test.rb
+++ b/activesupport/test/core_ext/array_ext_test.rb
@@ -82,6 +82,11 @@ class ArrayExtToSentenceTests < Test::Unit::TestCase
assert_equal "one", ['one'].to_sentence
end
+ def test_one_element_not_same_object
+ elements = ["one"]
+ assert_not_equal elements[0].object_id, elements.to_sentence.object_id
+ end
+
def test_one_non_string_element
assert_equal '1', [1].to_sentence
end