Skip to content

Prevent malformed exception messages from exiting RSpec

gitlab-qa-bot requested to merge fix-message-to_s-loop into main

Created by: JonRowe

When an exception message raises when to_s is called, particularly the loop style presented by #2753 (closed), RSpec will hard loop as it tries and fails to produce a valid string for the exception, this detects and prevent this from happening and produces a reasonable stand in explanation, but its not advisable (or possible in the case of the spec example) to introspect the error itself.

Fixes #2753 (closed).

Merge request reports