Skip to content

Commit 44f8c29

Browse files
authored
Add glyph for 'Run' code lenses (#544)
1 parent 955dc27 commit 44f8c29

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

lib/ruby_lsp/ruby_lsp_rails/code_lens.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def add_migrate_code_lens(node, name:, command:)
254254

255255
@response_builder << create_code_lens(
256256
node,
257-
title: "Run",
257+
title: "Run",
258258
command_name: "rubyLsp.runTask",
259259
arguments: [command],
260260
data: { type: "migrate" },
@@ -283,15 +283,15 @@ def add_test_code_lens(node, name:, command:, kind:)
283283

284284
@response_builder << create_code_lens(
285285
node,
286-
title: "Run",
286+
title: "Run",
287287
command_name: "rubyLsp.runTest",
288288
arguments: arguments,
289289
data: { type: "test", **grouping_data },
290290
)
291291

292292
@response_builder << create_code_lens(
293293
node,
294-
title: "Run In Terminal",
294+
title: "Run In Terminal",
295295
command_name: "rubyLsp.runTestInTerminal",
296296
arguments: arguments,
297297
data: { type: "test_in_terminal", **grouping_data },

test/ruby_lsp_rails/code_lens_test.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class Test < ActiveSupport::TestCase
3636
# The first 3 responses are for the test class.
3737
# The last 3 are for the test declaration.
3838
assert_equal(6, response.size)
39-
assert_match("Run", response[3].command.title)
39+
assert_match("Run", response[3].command.title)
4040
assert_match(%r{(ruby )?bin/rails test /fake\.rb:2}, response[3].command.arguments[2])
41-
assert_match("Run In Terminal", response[4].command.title)
41+
assert_match("Run In Terminal", response[4].command.title)
4242
assert_match("Debug", response[5].command.title)
4343
end
4444

@@ -54,9 +54,9 @@ class Test < ActiveSupport::TestCase
5454
# The first 3 responses are for the test class.
5555
# The last 3 are for the test declaration.
5656
assert_equal(6, response.size)
57-
assert_match("Run", response[3].command.title)
57+
assert_match("Run", response[3].command.title)
5858
assert_match(%r{(ruby )?bin/rails test /fake\.rb:2}, response[3].command.arguments[2])
59-
assert_match("Run In Terminal", response[4].command.title)
59+
assert_match("Run In Terminal", response[4].command.title)
6060
assert_match("Debug", response[5].command.title)
6161
end
6262

@@ -73,9 +73,9 @@ class Test < ActiveSupport::TestCase
7373
# The first 3 responses are for the test class.
7474
# The last 3 are for the test declaration.
7575
assert_equal(6, response.size)
76-
assert_match("Run", response[3].command.title)
76+
assert_match("Run", response[3].command.title)
7777
assert_match(%r{(ruby )?bin/rails test /fake\.rb:2}, response[3].command.arguments[2])
78-
assert_match("Run In Terminal", response[4].command.title)
78+
assert_match("Run In Terminal", response[4].command.title)
7979
assert_match("Debug", response[5].command.title)
8080
end
8181

@@ -144,9 +144,9 @@ def test_example
144144
# The first 3 responses are for the test declaration.
145145
# The last 3 are for the test class.
146146
assert_equal(6, response.size)
147-
assert_match("Run", response[3].command.title)
147+
assert_match("Run", response[3].command.title)
148148
assert_match(%r{(ruby )?bin/rails test /fake\.rb:2}, response[3].command.arguments[2])
149-
assert_match("Run In Terminal", response[4].command.title)
149+
assert_match("Run In Terminal", response[4].command.title)
150150
assert_match("Debug", response[5].command.title)
151151
end
152152

@@ -301,7 +301,7 @@ def change
301301
RUBY
302302

303303
assert_equal(1, response.size)
304-
assert_match("Run", response[0].command.title)
304+
assert_match("Run", response[0].command.title)
305305
assert_match("#{ruby} bin/rails db:migrate VERSION=123456", response[0].command.arguments[0])
306306
end
307307

0 commit comments

Comments
 (0)