I have the code lens annotations showing up in my editor.
If i have the terminal open and have the broker_suite rails app set as the current working directory, the run in terminal code lens command works great.
If I try to use the run command, I get the following:
An error occurred while loading ./engines/broker_suite/spec/integration/mutation/attach_files_spec.rb.
Failure/Error: require "rails_helper"
LoadError:
cannot load such file -- rails_helper
# ./engines/broker_suite/spec/integration/mutation/attach_files_spec.rb:1:in `<top (required)>'
Run options: include {:locations=>{"./engines/broker_suite/spec/integration/mutation/attach_files_spec.rb"=>[53]}}
All examples were filtered out
Finished in 0.00003 seconds (files took 0.10815 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
I can run the following successfully from my terminal from the top level of the project:
% bin/rspec -Iengines/broker_suite/spec -rrails_helper engines/broker_suite/spec/integration/mutation/attach_files_spec.rb
...
Finished in 0.38453 seconds (files took 3.7 seconds to load)
3 examples, 0 failures
Is there a way for me to be able to specify the load path and require statements in order to mimic what I can do on the terminal? I see there is a reference to rubyLsp.runTest and I assume there might be some translation to a launch command, but I can't seem to configure it in such a way to get it to trigger. Thanks for the thoughts!
I'm trying to figure out if I can provide some arguments or change the load path of the rspec command that is run from the code lens annotations.
Details:
I have a project structured like this: a top level Gemfile and a binstub for rspec, I have multiple rails apps under an
engines
folder.I have the code lens annotations showing up in my editor.
If i have the terminal open and have the
broker_suite
rails app set as the current working directory, therun in terminal
code lens command works great.If I try to use the run command, I get the following:
I can run the following successfully from my terminal from the top level of the project:
and I have a launch config that can do the same:
Is there a way for me to be able to specify the load path and require statements in order to mimic what I can do on the terminal? I see there is a reference to
rubyLsp.runTest
and I assume there might be some translation to a launch command, but I can't seem to configure it in such a way to get it to trigger. Thanks for the thoughts!