As you might have noticed, I’ve been spending some time trying to get running test suites with RSpec a bit better and faster over the last weeks. This week I looked into RSpec’s formatters.

Aside from the red “F” RSpec will output when a spec fails, there’s no direct feedback that allows you to go fix things immediately. You’ll simply have to wait until your whole suite is done running, or use ^C to interrupt the run. Another thing you can do is use the --fail-fast option I wrote about last week or check out rspec-instafail, which will output the failure details while continuing to run the rest of your specs. Nice.

Besides that, I realized there were more things that could be improved on, like knowing the total number of specs, the number of specs that have run already and maybe even an ETA or something like that. Also, the big string of dots and "F"’s started to seem unnecessary, there should be a nicer way to display this information.

I checked out RSpec’s formatters and realized it was extremely easy to write one, so I got distracted and wrote FffuuuFormatter, which makes RSpec print FFFUUU instead of FFFFF. Heh.