Skip to content

Conversation

@domingo2000
Copy link
Owner

@domingo2000 domingo2000 commented May 17, 2025

Motivation

The core LSP is integrating a new Test Explorer features that improves the integration of tests frameworks to the editor. As described here.

The goal of this PR is to be a implementation of the text explorer for Shoulda Context DSL of minitest/rails.

Note: This PR is a work in progress to check all the blockers for implementation, do not see current commits as final results.

Comment on lines +33 to +34
class_name = @nesting.join("::")
return unless class_name.end_with?("Test")
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be improved with the TestDiscover helpers to actually check the ancestors of the test class.

@domingo2000 domingo2000 force-pushed the feature/integrate-new-lsp-test-explorer branch from 3d029e5 to 2b8dfcd Compare May 17, 2025 01:37
@domingo2000 domingo2000 force-pushed the feature/integrate-new-lsp-test-explorer branch from 2b8dfcd to 2f8b152 Compare May 17, 2025 01:37
@domingo2000
Copy link
Owner Author

domingo2000 commented May 17, 2025

Current improvements:

  • Check visibility stack for test discovery
  • Add correct command resolution syntax (Currently the DSL is not correct)

Current blockers:

  • Check with RubyLsp how are the items sent for the command resolution custom request. This is necesary for the code lens command resolution that is core for the addon.
  • Check how to integrate this tests with the minitest resolution. The current implementation will send TestItems that will collide with the dynamic test creation of minitest framework. This is because ShouldaContext DSL is creating minitest test dinamically.
  • Check why the test resolution are not sent for the code lens generated for the inner nodes. The editor is only receiving request for test resolution for the class, but not for the methods.

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