Open mollerhoj opened 2 years ago
Thanks, @mollerhoj!
Confirming it works well even when delegate_to_formatters(:start, ...)
is called for all formatters (without name == "Fuubar"
condition).
Not sure where to add this in documentation. Maybe some section with workarounds.
P.S. I find JSON formatter more reliable for extracting the number of total examples.
json_summary = JSON.parse(`#{ENV["BUNDLE_BIN_PATH"]} exec rspec --dry-run --format json -- #{@files.join(" ")}`, symbolize_names: true)
total_examples_count = json_summary.dig(:summary, :example_count) || 0
Thanks for useful information! Yea, I think, this should be added to README file. I mean, simplecov and fuubar are kinda must have and it would be very handy to have all needed info about them in single place right after putting gem to Gemfile. 😄
@Mayurifag Thank you for your feedback.
@mollerhoj, @Mayurifag please open a PR with a README update. :-)
I use the fuubar formatter.
I just wanted to show a hack to get the formatter to work with this gem:
In
Reporter#add
, add the following hack:This will send the required
StartNotification
to fuubar.Now we can run the specs with
bundle exec turbo_tests -f Fuubar -r 'fuubar'
to get nicely formatted output.