[前][次][番号順一覧][スレッド一覧]

ruby-changes:64798

From: Koichi <ko1@a...>
Date: Fri, 8 Jan 2021 14:46:23 +0900 (JST)
Subject: [ruby-changes:64798] d4b7e967b6 (master): should use `assert_include` here.

https://git.ruby-lang.org/ruby.git/commit/?id=d4b7e967b6

From d4b7e967b6dc0c4b971cbb3b5444c7fbe93a3f86 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Fri, 8 Jan 2021 14:44:26 +0900
Subject: should use `assert_include` here.

Random ordering test can introduce antoher candidate so it should be
`assert_include`.

diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb
index 39d4be4..984453d 100644
--- a/test/irb/test_completion.rb
+++ b/test/irb/test_completion.rb
@@ -50,7 +50,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_completion.rb#L50
 
     def test_complete_predicate?
       candidates = IRB::InputCompletor.retrieve_completion_data("1.posi", bind: binding)
-      assert_equal %w[1.positive?], candidates
+      assert_include candidates, '1.positive?'
 
       namespace = IRB::InputCompletor.retrieve_completion_data("1.positive?", bind: binding, doc_namespace: true)
       assert_equal "Integer.positive?", namespace
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]