Class: Pbt::Reporter::RunDetailsReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/pbt/reporter/run_details_reporter.rb

Overview

Reporter for the run details of a property test.

Instance Method Summary collapse

Constructor Details

#initialize(run_details) ⇒ RunDetailsReporter

Returns a new instance of RunDetailsReporter.

Parameters:



8
9
10
# File 'lib/pbt/reporter/run_details_reporter.rb', line 8

def initialize(run_details)
  @run_details = run_details
end

Instance Method Details

#report_run_detailsObject

Report the run details of a property test. If the property test failed, raise a PropertyFailure.

Raises:



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/pbt/reporter/run_details_reporter.rb', line 16

def report_run_details
  if @run_details.failed
    message = []
    message << format_error_message
    message << error_backtrace
    message << if @run_details.verbose
      verbose_details
    end

    raise PropertyFailure, message.join("\n") if message.size > 0
  end
end