Skip to content

Add code lens extension (for Rails tests) #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

adisonlampert
Copy link

⚠️ Must be merged after Shopify/ruby-lsp#666

Description

Add code lens extension to recognize Rails tests:

test "should test something" do
    # assert something
end

A Rails test is a SyntaxTree::Command with the test name as the first argument so the extension implements on_command to create code lenses for Rails tests.

Shopify/ruby-lsp#666 adds parameters to initialize so I also updated the hover extension + tests.

Testing

Created code_lens_test.rb that checks that Rails-styled tests are recognized and a CodeLens response is created.

You can also manually test by checking out this branch and running the tests in code_lens_test.rb from the file.

@adisonlampert adisonlampert force-pushed the al/add-code-lens-extension branch from f602abc to abab823 Compare April 28, 2023 20:50
@andyw8 andyw8 added this to the 2023-Q2 milestone May 1, 2023
@andyw8 andyw8 changed the title Add code lens extension Add code lens extension (for Rails tests) May 8, 2023
This was referenced May 8, 2023
@andyw8
Copy link
Contributor

andyw8 commented May 8, 2023

I have continued this in #67 - I'm leaving this as-is to allow for a comparison.

@andyw8 andyw8 closed this May 8, 2023
@vinistock vinistock deleted the al/add-code-lens-extension branch May 25, 2023 14:25
@andyw8 andyw8 self-assigned this Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants