From cb1d634d6acd6a7171c146115e9d44bc9e55e3b6 Mon Sep 17 00:00:00 2001 From: knu Date: Fri, 14 Jul 2017 08:46:10 +0000 Subject: [PATCH] Make tests for Set#inspect more straightforward git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_set.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/test_set.rb b/test/test_set.rb index 07c404ab79..5774af741e 100644 --- a/test/test_set.rb +++ b/test/test_set.rb @@ -705,15 +705,14 @@ class TC_Set < Test::Unit::TestCase end def test_inspect - set1 = Set[1] - - assert_equal('#', set1.inspect) + set1 = Set[1, 2] + assert_equal('#', set1.inspect) set2 = Set[Set[0], 1, 2, set1] - assert_equal(false, set2.inspect.include?('#')) + assert_equal('#, 1, 2, #}>', set2.inspect) set1.add(set2) - assert_equal(true, set1.inspect.include?('#')) + assert_equal('#, 1, 2, #}>}>', set2.inspect) end def test_compare_by_identity