class RSpec::Core::Configuration

def add_formatter(formatter_to_use, *paths)

Overloads:
  • add_formatter(formatter)
def add_formatter(formatter_to_use, *paths)
  formatter_class =
    built_in_formatter(formatter_to_use) ||
    custom_formatter(formatter_to_use) ||
    (raise ArgumentError, "Formatter '#{formatter_to_use}' unknown - maybe you meant 'documentation' or 'progress'?.")
  paths << output_stream if paths.empty?
  formatters << formatter_class.new(*paths.map {|p| String === p ? file_at(p) : p})
end