-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add minitest backtrace filter #457
Conversation
README.md
Outdated
|
||
```ruby | ||
# test/test_helper.rb | ||
require "spoom/minitest/backtrace_filter" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(wondering where this should be a manual require or not)
8abfb97
to
5ee258a
Compare
|
||
module Spoom | ||
module BacktraceFilter | ||
class Minitest < ::Minitest::BacktraceFilter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally had Spoom::Minitest::BacktraceFilter
but that causes typecheck problems with tests in the Spoom
namespace that inherit from Minitest::Test
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: rename the file to match the updated naming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can change the tests to inherit from ::Minitest::Test
if you prefer the other name 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this way is ok, have renamed the file to match.
lib/spoom.rb
Outdated
@@ -18,4 +18,5 @@ class Error < StandardError; end | |||
require "spoom/deadcode" | |||
require "spoom/sorbet" | |||
require "spoom/cli" | |||
require "spoom/minitest/backtrace_filter" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd make this require manual and not included in the default require.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
6719295
to
79987ce
Compare
Here's a Ruby LSP branch using this, for verification: https://github.com/Shopify/ruby-lsp/pull/965/files Note that we need to add an entry to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, but I'll let Alex decide if he prefers the default require
79987ce
to
0c0163e
Compare
Closes #456