diff --git a/lib/ruby_lsp/requests/code_lens.rb b/lib/ruby_lsp/requests/code_lens.rb index 4e1adc9cf..c1dbade85 100644 --- a/lib/ruby_lsp/requests/code_lens.rb +++ b/lib/ruby_lsp/requests/code_lens.rb @@ -128,22 +128,22 @@ def add_code_lens(node, name:, command:) @response << create_code_lens( node, - title: "Debug", - command_name: "rubyLsp.debugTest", + title: "Run In Terminal", + command_name: "rubyLsp.runTestInTerminal", path: @path, name: name, test_command: command, - type: "debug", + type: "test_in_terminal", ) @response << create_code_lens( node, - title: "Run In Terminal", - command_name: "rubyLsp.runTestInTerminal", + title: "Debug", + command_name: "rubyLsp.debugTest", path: @path, name: name, test_command: command, - type: "test_in_terminal", + type: "debug", ) end end diff --git a/test/expectations/code_lens/minitest_tests.exp.json b/test/expectations/code_lens/minitest_tests.exp.json index 52ac0112f..2e43084ae 100644 --- a/test/expectations/code_lens/minitest_tests.exp.json +++ b/test/expectations/code_lens/minitest_tests.exp.json @@ -42,8 +42,8 @@ } }, "command": { - "title": "Debug", - "command": "rubyLsp.debugTest", + "title": "Run In Terminal", + "command": "rubyLsp.runTestInTerminal", "arguments": [ "/fake.rb", "Test", @@ -57,7 +57,7 @@ ] }, "data": { - "type": "debug" + "type": "test_in_terminal" } }, { @@ -72,8 +72,8 @@ } }, "command": { - "title": "Run In Terminal", - "command": "rubyLsp.runTestInTerminal", + "title": "Debug", + "command": "rubyLsp.debugTest", "arguments": [ "/fake.rb", "Test", @@ -87,7 +87,7 @@ ] }, "data": { - "type": "test_in_terminal" + "type": "debug" } }, { @@ -132,8 +132,8 @@ } }, "command": { - "title": "Debug", - "command": "rubyLsp.debugTest", + "title": "Run In Terminal", + "command": "rubyLsp.runTestInTerminal", "arguments": [ "/fake.rb", "test_public", @@ -147,7 +147,7 @@ ] }, "data": { - "type": "debug" + "type": "test_in_terminal" } }, { @@ -162,8 +162,8 @@ } }, "command": { - "title": "Run In Terminal", - "command": "rubyLsp.runTestInTerminal", + "title": "Debug", + "command": "rubyLsp.debugTest", "arguments": [ "/fake.rb", "test_public", @@ -177,7 +177,7 @@ ] }, "data": { - "type": "test_in_terminal" + "type": "debug" } }, { @@ -222,8 +222,8 @@ } }, "command": { - "title": "Debug", - "command": "rubyLsp.debugTest", + "title": "Run In Terminal", + "command": "rubyLsp.runTestInTerminal", "arguments": [ "/fake.rb", "test_public_command", @@ -237,7 +237,7 @@ ] }, "data": { - "type": "debug" + "type": "test_in_terminal" } }, { @@ -252,8 +252,8 @@ } }, "command": { - "title": "Run In Terminal", - "command": "rubyLsp.runTestInTerminal", + "title": "Debug", + "command": "rubyLsp.debugTest", "arguments": [ "/fake.rb", "test_public_command", @@ -267,7 +267,7 @@ ] }, "data": { - "type": "test_in_terminal" + "type": "debug" } }, { @@ -312,8 +312,8 @@ } }, "command": { - "title": "Debug", - "command": "rubyLsp.debugTest", + "title": "Run In Terminal", + "command": "rubyLsp.runTestInTerminal", "arguments": [ "/fake.rb", "test_another_public", @@ -327,7 +327,7 @@ ] }, "data": { - "type": "debug" + "type": "test_in_terminal" } }, { @@ -342,8 +342,8 @@ } }, "command": { - "title": "Run In Terminal", - "command": "rubyLsp.runTestInTerminal", + "title": "Debug", + "command": "rubyLsp.debugTest", "arguments": [ "/fake.rb", "test_another_public", @@ -357,7 +357,7 @@ ] }, "data": { - "type": "test_in_terminal" + "type": "debug" } }, { @@ -402,8 +402,8 @@ } }, "command": { - "title": "Debug", - "command": "rubyLsp.debugTest", + "title": "Run In Terminal", + "command": "rubyLsp.runTestInTerminal", "arguments": [ "/fake.rb", "test_public_vcall", @@ -417,7 +417,7 @@ ] }, "data": { - "type": "debug" + "type": "test_in_terminal" } }, { @@ -432,8 +432,8 @@ } }, "command": { - "title": "Run In Terminal", - "command": "rubyLsp.runTestInTerminal", + "title": "Debug", + "command": "rubyLsp.debugTest", "arguments": [ "/fake.rb", "test_public_vcall", @@ -447,7 +447,7 @@ ] }, "data": { - "type": "test_in_terminal" + "type": "debug" } } ], diff --git a/test/requests/code_lens_expectations_test.rb b/test/requests/code_lens_expectations_test.rb index df653f858..f282c51c7 100644 --- a/test/requests/code_lens_expectations_test.rb +++ b/test/requests/code_lens_expectations_test.rb @@ -33,8 +33,8 @@ class Test < Minitest::Test; end assert_equal(response.size, 4) assert_match("Run", response[0].command.title) - assert_match("Debug", response[1].command.title) - assert_match("Run In Terminal", response[2].command.title) + assert_match("Run In Terminal", response[1].command.title) + assert_match("Debug", response[2].command.title) assert_match("Run Test", response[3].command.title) ensure RubyLsp::Requests::Hover.listeners.clear