From e4ea26467657c931f5a75614e47f1f825e9f0cf7 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 21 Jun 2023 22:42:23 +0100 Subject: [PATCH 1/2] Properly cleanup CodeLens' listener test --- test/requests/code_lens_expectations_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/requests/code_lens_expectations_test.rb b/test/requests/code_lens_expectations_test.rb index 954c55c7de..7d1dd93436 100644 --- a/test/requests/code_lens_expectations_test.rb +++ b/test/requests/code_lens_expectations_test.rb @@ -99,7 +99,7 @@ class Test < Minitest::Test; end assert_match("Debug", response[2].command.title) assert_match("Run Test", response[3].command.title) ensure - RubyLsp::Requests::Hover.listeners.clear + RubyLsp::Requests::CodeLens.listeners.clear T.must(message_queue).close end From 90beee6951cdef5fdd362e28d95f0608faaaf01e Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 21 Jun 2023 22:43:32 +0100 Subject: [PATCH 2/2] Refactor empty reponse assertions --- test/requests/code_lens_expectations_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/requests/code_lens_expectations_test.rb b/test/requests/code_lens_expectations_test.rb index 7d1dd93436..a2ce4d7a29 100644 --- a/test/requests/code_lens_expectations_test.rb +++ b/test/requests/code_lens_expectations_test.rb @@ -58,7 +58,7 @@ def test_bar; end emitter.visit(document.tree) response = listener.response - assert_equal(0, response.size) + assert_empty(response) end def test_no_code_lens_for_rspec @@ -76,7 +76,7 @@ def test_bar; end emitter.visit(document.tree) response = listener.response - assert_equal(0, response.size) + assert_empty(response) end def test_after_request_hook