You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have any direct gem dependencies that start with rspec it will detect that you're using rspec as the testing framework. This is a false-positive as we use that gem to have rspec-like tests with minitest. Ideally it should look for the rails script first and use that for testing. That is more likely to work with a wider range of test frameworks if the project is a rails one. Failing that, it would be nice to be able to manually set the testing framework in the project's settings to skip the auto-detection.
Load a ruby project in VSCode
Open a Ruby file
See the detected test library (example below)
Output from Ruby LSP
2025-01-29 14:09:21.932 [info] (arculix-core) Detected test library: rspec
The text was updated successfully, but these errors were encountered:
nhumble-sa
added
bug
Something isn't working
vscode
This pull request should be included in the VS Code extension's release notes
labels
Jan 29, 2025
Thank you for the bug report. The best solution is to use our ancestor linearization logic to detect to which framework the current test belongs to, which is described in #1334. Trying to detect based on dependencies or project structure is prone to false positives/negatives.
I'll close this issue to centralize all discussions in #1334.
Description
Ruby LSP Information
VS Code Version
1.96.4
Ruby LSP Extension Version
0.8.19
Ruby LSP Server Version
0.23.7
Ruby LSP Add-ons
Ruby Version
3.3.6
Ruby Version Manager
asdf
Installed Extensions
Click to expand
Ruby LSP Settings
Click to expand
Workspace
User
Reproduction steps
If you have any direct gem dependencies that start with
rspec
it will detect that you're using rspec as the testing framework. This is a false-positive as we use that gem to have rspec-like tests with minitest. Ideally it should look for therails
script first and use that for testing. That is more likely to work with a wider range of test frameworks if the project is a rails one. Failing that, it would be nice to be able to manually set the testing framework in the project's settings to skip the auto-detection.Output from Ruby LSP
2025-01-29 14:09:21.932 [info] (arculix-core) Detected test library: rspec
The text was updated successfully, but these errors were encountered: