Exception: Hypothesis::MultipleExceptionError

Inherits:
MultipleExceptionErrorParent show all
Defined in:
lib/hypothesis/errors.rb

Instance Attribute Summary

Attributes inherited from MultipleExceptionErrorParent

#all_exceptions

Instance Method Summary collapse

Methods inherited from MultipleExceptionErrorParent

#initialize

Constructor Details

This class inherits a constructor from Hypothesis::MultipleExceptionErrorParent

Instance Method Details

#backtraceObject



57
58
59
# File 'lib/hypothesis/errors.rb', line 57

def backtrace
  []
end

#messageObject



45
46
47
48
49
50
51
52
53
54
55
# File 'lib/hypothesis/errors.rb', line 45

def message
  jd = HypothesisJunkDrawer
  "Test raised #{all_exceptions.length} distinct errors:\n\n" +
    all_exceptions.map do |e|
      location = jd.find_first_relevant_line(e.backtrace).sub(/:in.+$/, '')
      backtrace = jd.prune_backtrace(e.backtrace)
      "#{e.class} at #{location}:\n" \
        "#{e.message}\n#{backtrace.map { |s| '  ' + s }
          .join("\n")}"
    end.join("\n\n")
end