-
Notifications
You must be signed in to change notification settings - Fork 26
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
Multiple project folders in a workspace causes isSpec
test to fail
#15
Comments
This is still happening for me on 0.5.11. Ubuntu (in WSL2), project with multiple roots. |
Hey @fsoikin Can you simulate this for me? In theory, this is happen no more. |
I'm not sure what "simulate" means in this context, but sure, I can help with debugging. What would you like me to do? |
@fsoikin I would like to know, what exactly happens in these cases. Which scenes? Which name projects? Is file name is the same? |
I don't quite understand these questions.
I suspect that either by "projects" or "scenes" you may mean VSCode roots. In case that's right - it's a multiroot workspace, and there are two roots in it, one named "rails" and the other named "purs" (though I don't see how the names could be relevant), with the tests located under the "rails" root, in the "spec/" subdirectory. Here's the terminal log I get when trying to run the "RSpec: Run Line on RSpec" (aka
As you can see, it did correctly pick up the line, but the file name is, for some reason, The same log results when trying to "RSpec Run File on RSpec" (aka |
@fsoikin I will going to analyze this scene locally and then go back with new version to fix this. |
Thank you very much @thadeu |
I'm also facing this issue 😞 |
Sorry folks! I will work to fix this on the weekend, I promise for you. |
Same problem here. Did you find time to have a look at it @thadeu ? |
@ThomasSertorio Can you could update extension and test again? |
Using the extension in a workspace with multiple project folders, where the invoked spec is not in the first open project, results in an incomplete command being sent to the terminal.
bundle exec rspec --color spec/_spec.rb
The filename string replacement in
getAsRelativePath
assumes that a single project folder is open in the workspace.The builtin
vscode.workspace.rootPath
will always resolve to the first open folder in the workspace. This property is deprecated and VSCode recommends the alternativevscode.workspace.workspaceFolders
instead. One possible fix is to iterate over that list until a match is found with the return value ofgetFilename()
. It might also be possible to enhance theisApp
,isLib
, andisSpec
tests to avoid having that dependency.The text was updated successfully, but these errors were encountered: