Skip to content

Single test run fails on windows because of absolute file path #3301

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
csenszike opened this issue Mar 14, 2025 · 0 comments
Open

Single test run fails on windows because of absolute file path #3301

csenszike opened this issue Mar 14, 2025 · 0 comments
Labels
bug Something isn't working help-wanted Extra attention is needed

Comments

@csenszike
Copy link

Description

Ruby LSP Information

VS Code Version

1.98.2

Ruby LSP Extension Version

0.9.7

Ruby LSP Server Version

0.23.11

Ruby LSP Add-ons

  • Ruby LSP Rails

Ruby Version

3.3.3

Ruby Version Manager

rubyInstaller

Installed Extensions

Click to expand
  • debugpy (2025.4.1)
  • dependi (0.7.13)
  • haml (1.4.1)
  • haml-lint (0.2.1)
  • open-in-external-app (0.10.0)
  • python (2025.2.0)
  • rails-fast-nav (1.3.6)
  • ruby-lsp (0.9.7)
  • rust-analyzer (0.3.2337)
  • rust-bundle (1.0.0)
  • rust-syntax (0.6.1)
  • vscode-docker (1.29.4)
  • vscode-pylance (2025.3.2)
  • vscode-yaml (1.17.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": "auto"
  },
  "customRubyCommand": "",
  "formatter": "auto",
  "linters": null,
  "bundleGemfile": "",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "",
  "indexing": {},
  "erbSupport": true,
  "featureFlags": {},
  "sigOpacityLevel": "1"
}

Reproduction steps

  1. Open a test file from the test folder.
  2. Click on the "Run In Terminal" link on a single specific test (not the one above the whole class definition.

In the terminal the issued command will be eg.:
"C:/Ruby33-x64/bin/ruby.exe bin/rails test s:/project_folder/test/models/geometry_m/geometry_test.rb:4"

This command runs every tests (not just in this file, but even in the entire project).

Additional information and trials:

  1. Problem is independent of how the binary is invoked: "C:/Ruby33-x64/bin/ruby.exe bin/rails test ..." and "rails test..." produces the same result
  2. If I use relative path to the file in terminal command, it works as expected: "C:/Ruby33-x64/bin/ruby.exe bin/rails test test/models/geometry_m/geometry_test.rb:4"
  3. The same problem occures if I don't use "Run In Terminal" but "Run" link instead and also running form the Test Explorer
  4. I searched a lot (in Ruby LSP's source code too) for any possible configuration of the test command arguments, but I couldn't find anything. Even couldn't locate when, how and where the command is built up.
@csenszike csenszike added the bug Something isn't working label Mar 14, 2025
@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
Projects
None yet
Development

No branches or pull requests

2 participants