Worked on with @cdemyanovich during waza at @8thlight
When running RSpec with the --profile option, slow tests are displayed in red. This causes me to think my tests fail!
This patch introduces the --slow-color (akas: --slow-colour, -s) option to allow the color to be changed. It defaults to cyan.
Add colour option for -p's slow test output
Wow - the fact that this needed so many specs suggests we've got a serious DRY violation! Not to be fixed in this context - but great to see it exposed.
Hmm - I merged this but now I'm not sure if I like the cyan as the default. The point of red was to alert you to something going on. Maybe yellow would be a better choice since we associate yellow with warnings. WDYT?
Revert "Merge pull request #539 from JoshCheek/profile-color-customiz…
This reverts commit d00e001, reversing
changes made to 0cdc8d4.
After giving this some more thought, I don't see much value in offering an option to choose your color for this. I am, however, open to changing the color to the same yellow as pending, or perhaps formatting it just like pending examples (example name in yellow, extra information in cyan). What's your preference? Wanna make submit another patch for it?
The motivation for introducing an option was that some colors were more readable than others on the various terminal color schemes here. The main motivation, though, was to use a color other than the one (red) used for failure. I'd be cool with a patch that addresses only that issue.
Here are all the colour options side by side on white/black/blue background.
Seems like yellow and cyan both show up clearly. Let's go with yellow for the spec name and cyan for the time and path - it'll look just like pending examples, but the "Top n slowest examples" will clarify which is which.
You want to make a patch for that? If not, I'm happy to make the change.
Josh and I can work on this Fri. afternoon if you want to wait until then.
I'm in no hurry - that's fine.