class RSpec::Core::Formatters::ExceptionPresenter::Factory
@private Configuring the ‘ExceptionPresenter` with the right set of options to handle pending vs failed vs skipped and aggregated (or not) failures is not simple. This class takes care of building an appropriate `ExceptionPresenter` for the provided example.
Public Class Methods
# File rspec-core/lib/rspec/core/formatters/exception_presenter.rb, line 314 def initialize(example) @example = example @execution_result = example.execution_result @exception = if @execution_result.status == :pending @execution_result.pending_exception else @execution_result.exception end end
Public Instance Methods
# File rspec-core/lib/rspec/core/formatters/exception_presenter.rb, line 308 def build ExceptionPresenter.new(@exception, @example, options) end