You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When tests are running through any execution mode, we set the `RUBY_LSP_TEST_RUNNER` environment variable to allow
127
127
users to customize behavior of their test suite if needed.
128
128
129
-
{: .important }
130
-
The Ruby LSP uses a custom test reporter to be able to communicate between extension and server. Some gems that modify
131
-
reporters may break this integration. The `RUBY_LSP_TEST_RUNNER` variable can be used to turn off these gems only when
132
-
running under the Ruby LSP's integrations.
133
-
134
129
{: .important }
135
130
Using coverage mode **does not require any extra dependencies or configuration** for collecting the coverage data. This is done automatically by the Ruby LSP through Ruby's built-in coverage API.
136
131
137
-
For example
138
-
139
-
```ruby
140
-
# test/test_helper.rb
141
-
142
-
unlessENV["RUBY_LSP_TEST_RUNNER"]
143
-
# Minitest reporters cannot be used when running through the Ruby LSP integrations as it breaks our custom reporter
144
-
145
-
require"minitest/reporters"
146
-
Minitest::Reporters.use!(...)
147
-
end
148
-
```
149
-
150
132
Users can also differentiate between the mode of execution, which is the value of the `RUBY_LSP_TEST_RUNNER` variable:
0 commit comments