Skip to content

Full Test Discovery inside entire codebase #91

@Splines

Description

@Splines

The RubyLSP Test Explorer offers the following config option:

"rubyLsp.featureFlags": {
  "fullTestDiscovery": true
}

However, when I turn it on, the rspec command is executed as following:

bundle exec bin/rspec -r /my/path/.rbenv/versions/3.3.8/lib/ruby/gems/3.3.0/gems/ruby-lsp-rspec-0.1.28/lib/ruby_lsp/ruby_lsp_rspec/rspec_formatter.rb -f RubyLsp::RSpec::RSpecFormatter /my/path/spec/models/user_cleaner_spec.rb:27

If I set fullTestDisocvery to false, tests are executed without the -r and -f arguments:

bundle exec bin/rspec /my/path/spec/models/user_cleaner_spec.rb:27

For my setup, the latter works fine and I want to avoid the -f and -r options since I'm using docker compose exec. Is there a way for ruby-lsp-rspec to still show the tests for the entire codebase, and not only for open files?

On a side-note: I've also tried to write a custom Ruby script that maps -f and -r to the respective files in the Docker container (including the rspec_formatter.rb file). This works fine when executed in the terminal, however the VSCode Ruby LSP extension doesn't detect the end of the test running, i.e. it just continues to spin in the "running test" state, even though the test has already passed or failed, which one sees as stdout output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions