rspec / rspec-core

RSpec runner and formatters
http://rspec.info
MIT License
1.23k stars 765 forks source link

Numbered list of failed specs #3078

Closed loqimean closed 3 days ago

loqimean commented 7 months ago

Subject of the issue

It would be fine to have numbered list of specs, like wew have them numbered in a detailed view, but then, in the bottom, we just see list. So, when I see detailed spec with a number for example 4 and would like to run it, I'm going to bottom and I must to search where is that spec by manual numbering. So, adding numbers there too would be nice, isn't?

Your environment

Steps to reproduce

Just fails more than one test

Expected behavior

We see failed specs when them are described, like this:

Screenshot 2024-04-16 at 11 06 20

And then in the bottom we see also numbered list here:

Screenshot 2024-04-16 at 11 07 04

Actual behavior

We see numbers for detailed specs only and when we going to bottom to copy a path for such spec it requires to find it by myself

loqimean commented 7 months ago

This improvement adds +100 to speed of debugging failed specs. I can open PR for this if it's really relevant

JonRowe commented 7 months ago

:wave: If you wanted to add the failure number to the comment, that seems reasonable, but note it has to be in the comment because those lines are designed to be directly copy / pastable into a shell... You could also easily produce a custom formatter to do this yourself in a gem etc

JonRowe commented 3 days ago

Closing due to inactivity during the monorepo migration, but if someone wanted to revisit this they'd be welcome.