Method: RSpec::Core::MultipleExceptionError#initialize

Defined in:
lib/rspec/core/formatters/exception_presenter.rb

#initialize(*exceptions) ⇒ MultipleExceptionError

Returns a new instance of MultipleExceptionError.

Parameters:

  • exceptions (Array<Exception>)

    The initial list of exceptions.

[View source]

519
520
521
522
523
524
525
526
527
528
529
# File 'lib/rspec/core/formatters/exception_presenter.rb', line 519

def initialize(*exceptions)
  super()

  @failures                = []
  @other_errors            = []
  @all_exceptions          = []
  @aggregation_metadata    = { :hide_backtrace => true }
  @aggregation_block_label = nil

  exceptions.each { |e| add e }
end