st0012 / ruby-lsp-rspec

A Ruby LSP addon for RSpec tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Passing tests appear to have failed

jar349 opened this issue · comments

In a terminal, running: bundle exec rspec runs all my tests in ./spec and they all pass.

In the Testing pane of VS Code, I run some tests and they pass but appear visibly to have failed. See the image below and note the 1 example, 0 failures

Image

I have this in the development group of my Gemfile:

  gem "ruby-lsp", "~> 0.14.3"
  gem "ruby-lsp-rspec", "~> 0.1.10"

I suspect that this may be due to this:

Image

note:

Line coverage (27.16%) is below the expected minimum coverage (100.00%).
SimpleCov failed with exit 2 due to a coverage related error

The problem I have is that SimpleCov is configured in ./specs/spec_helper.rb to require full coverage:

SimpleCov.minimum_coverage 100

But with ruby-lsp-rspec, there doesn't seem to be a way to just run all tests? The code lenses are contextual in a single file. I need a way to run all tests so that my coverage will be at 100% and rspec will exit with code zero.

So the problem I have with only being able to run the tests from a code lens is that I don't have a way to run ALL the tests in my repo at once, which means my coverage metrics will always fail my tests.

Would it be possible to add a way to run all the tests in a repo?