-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fix class name in reports #104
Conversation
Can you elaborate on what this fixes? What was observed before and what is observed afterwards? |
Sorry. Using current minitest, reports don't report the test class, they list
After the patch, they look like:
Thanks, Greg Note: Below I've attached a script (
For a RubyGems command reference, see here. |
Will this patch impact older version of Minitest? |
Yes. Sorry. I just checked in 2016 with 5.4.3. Long story, but Minitest doesn't tag the repo with versions, so checking things version by version is a PITA. The Result class was added in v5, so I assumed 5.4.3 had the klass attribute. It does not. I'll update the PR... Greg |
c11ded4
to
10cf425
Compare
@@ -75,7 +75,10 @@ def report | |||
|
|||
def record(result) | |||
super | |||
io.puts "%s#%s = %.2f s = %s" % [result.class, | |||
unless instance_variable_defined? :@has_klass |
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.
The logic in these two files are duplicated. I think it would be ideal if this was put into a Mix-in module that could reuse the logic across both reporters. And along with a comment that explains why this is being done the way it is.
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'll be looking at some Minitest stuff later. Minitest 5.11.3 (current) does not have a Ruby version constraint, and I believe this PR is due to testup-2 using an old version (not 100% sure).
Should we/you just update the Minitest version used (and skip the reporter changes)?
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 got an issue logged to look into the Minitest version. I'm spinning up on TestUp2 work, so I'll get back to this shortly.
I don't recall why a newer version of MiniTest didn't work previously. I might have never found the real cause of it. So will have to see how the latest version fares.
Closing in favor of #217 |
No description provided.