Skip to content

Minitest ignored when including rspec-expectations #3204

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

Open
Cluster444 opened this issue Feb 17, 2025 · 1 comment
Open

Minitest ignored when including rspec-expectations #3204

Cluster444 opened this issue Feb 17, 2025 · 1 comment
Labels
bug Something isn't working help-wanted Extra attention is needed vscode This pull request should be included in the VS Code extension's release notes

Comments

@Cluster444
Copy link

Description

I'm using minitest and everything was working fine when running tests. I had to add rspec-expectations in order to get some rspec test matchers working, and as soon as I did that the LSP stopped working because now it thinks I'm using RSpec, even though I don't include rspec itself anywhere.

Seems like the test detector forces it into RSpec if any rspec like gem is loaded with no means of overriding?

Would it be possible to get make this overridable like the linter/formatter?

Right now i'm not sure how to even override this or patch it other than renaming rspec-expectations to something else... any ideas?

Ruby LSP Information

VS Code Version

1.94.0

Ruby LSP Extension Version

0.9.5

Ruby LSP Server Version

0.23.11

Ruby LSP Add-ons

  • Ruby LSP Rails

Ruby Version

3.4.1

Ruby Version Manager

mise

Installed Extensions

Click to expand
  • ruby-lsp (0.9.5)
  • vim (1.29.0)

Ruby LSP Settings

Click to expand
Workspace
{}
User
{
  "enabledFeatures": {
    "codeActions": true,
    "diagnostics": true,
    "documentHighlights": true,
    "documentLink": true,
    "documentSymbols": true,
    "foldingRanges": true,
    "formatting": true,
    "hover": true,
    "inlayHint": true,
    "onTypeFormatting": true,
    "selectionRanges": true,
    "semanticHighlighting": true,
    "completion": true,
    "codeLens": true,
    "definition": true,
    "workspaceSymbol": true,
    "signatureHelp": true,
    "typeHierarchy": true
  },
  "featuresConfiguration": {},
  "addonSettings": {},
  "rubyVersionManager": {
    "identifier": "mise"
  },
  "customRubyCommand": "",
  "formatter": "auto",
  "linters": null,
  "bundleGemfile": "",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "",
  "indexing": {},
  "erbSupport": true,
  "featureFlags": {}
}
@Cluster444 Cluster444 added bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes labels Feb 17, 2025
@andyw8
Copy link
Contributor

andyw8 commented Feb 19, 2025

The detection happens here:

def detect_test_library(dependencies)

We have an issue on the roadmap to improve detection of test frameworks, but until then you can try patching, or fork the gem and modify it.

@egiurleo egiurleo added the help-wanted Extra attention is needed label Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help-wanted Extra attention is needed vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

No branches or pull requests

3 participants