diff --git a/spec/base_spec_helper.rb b/spec/base_spec_helper.rb index bfa70791e5..11e2fae0ee 100644 --- a/spec/base_spec_helper.rb +++ b/spec/base_spec_helper.rb @@ -129,6 +129,16 @@ RSpec.configure do |config| # https://rspec.info/features/3-12/rspec-core/configuration/zero-monkey-patching-mode/ config.disable_monkey_patching! + # Many RSpec users commonly either run the entire suite or an individual + # file, and it's useful to allow more verbose output when running an + # individual spec file. + if config.files_to_run.one? + # Use the documentation formatter for detailed output, + # unless a formatter has already been configured + # (e.g. via a command-line flag). + config.default_formatter = "doc" + end + # Reset locale for all specs. config.around(:each) do |example| I18n.with_locale(:en) { example.run }