Add default formatter to rspec if none given
What does this MR do and why?
Quarantine E2E and non-E2E tests using Quaranti... (!218566 - merged) added a formatter to our default RSpec configuration. RSpec only adds the default formatter (progress) if no formatters were added to the config. As a result, our RSpec is now very quiet (though still running the tests!):
$ bin/rspec spec/lib/banzai/color_parser_spec.rb
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
The specs actually ran (you'll get a non-zero exit on failure), but we don't get any output. Explicitly specifying a formatter has the effect of adding it manually:
$ bin/rspec spec/lib/banzai/color_parser_spec.rb -fp
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
.................................................................................................
Finished in 0.02176 seconds (files took 1.61 seconds to load)
97 examples, 0 failures
This MR explicitly adds the default formatter if none was specified on the command line, so the later addition of GitlabQuality::TestTooling::TestQuarantine::QuarantineFormatter doesn't affect the default output.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.