Possible regression with Code Lens for running spec-style tests
There seems to have been some regression with the Code Lens for running spec-style tests. On Tapioca, Kaan says it was working previously, but now it is failing, e.g.
tapioca main % bundle exec ruby -Itest /Users/andyw8/src/github.com/Shopify/tapioca/spec/tapioca/cli/annotations_spec.rb --name "/^T
apioca::AnnotationsTest(#|::)/"
/opt/rubies/3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `require': cannot load such file -- spec_helper (LoadError)
from /opt/rubies/3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
from /Users/andyw8/src/github.com/Shopify/tapioca/spec/tapioca/cli/annotations_spec.rb:4:in `<main>'
(this could relate to a change within Tapioca itself)
The problem is with the -Itest part. For that project, it should be -Ispec.
If that's the only problem, then this is a duplicate of #2308 and we can close this one.
I think https://github.com/Shopify/ruby-lsp/pull/2522 is partly the cause. If I try the ruby-lsp version prior to that (v0.17.17), and just change -Itest to -Ispec then it works, e.g.
bundle exec ruby -Ispec /Users/andyw8/src/github.com/Shopify/tapioca/spec/tapioca/cli/gem_spec.rb --name /must\ remove\ outdated\ RBIs/
Started with run options --name "/must remove outdated RBIs/" --seed 41260
This is likely related to the specs in Tapioca being within a class definition, which is a bit different from normal specs.
This issue is being marked as stale because there was no activity in the last 2 months
I'll close this since it wasn't a regression, it had never worked previously. But it should all be working once https://github.com/Shopify/ruby-lsp/pull/2706 is released.