test#project_root with multiple projects
gdonald opened this issue · comments
Is there some other option besides
let test#project_root = "/path/to/your/project"
It doesn't seem to work across multiple projects. I have a Ruby/RSpec project where my code lives in a subdirectory from where I open vim. And then I also have many other Ruby/RSpec projects where my code lives in same directory where I open vim.
Can't you just look for the nearest Gemfile relative to the spec file being ran and treat that directory like the root?
This is a good question and one that often comes up, which is why the documentation was updated as part of #492
I believe the focus of this plug-in should be running tests from the project root rather than the monorepo root as this is how many Vim plug-ins work, for example vim-respec also has this limitation.
Ideally detecting and setting the project root when working with a monorepo would be handled outside vim-test by another plugin or script as this could also be leveraged by other plug-ins that aren't designed to be run at a monorepo root.
Your rodeo, user needs be darned :(
Your rodeo, user needs be darned :(
I am open to solutions to this and it's a problem for other plug-ins that rely on a project root and any configuration files or binaries relative to it, so hopefully it's already been solved and we can leverage that.