disu.se

ExceptionClass

Namespace

Lookout::Difference

Ancestors
  1. Object

  2. Object

Difference reports between ::Exceptions. The report differs from that of Object in that it tries to “diff” the exception messages and that it uses ‘≉’ instead of ‘≠’ to show that the actual result doesn’t match an expected Regexp.

Constructor

initialize(actual::Exception, expected::Exception, regexp::Regexp? = nil)#

Initializes a difference report between the actual result and the expected value, where regexp is the ::Regexp found inside expected, if any.

Instance Methods

diffEnumerable<String>, super#

Returns the result of String#diff between #expected’s message and #actual’s message if #actual and #expected are of the same class and #expected and #actual’s messages are Strings, super otherwise.

inspect_expected::String, superprivate#

Returns a specially crafted inspection String containing the Regexp if #expected contains a Regexp, super otherwise.

symbol::String, superprivate#

Returns the symbol ‘≉’ if a Regexp was found inside #expected, super otherwise.