Skip to content

Add failure details when using HTML formatter with "aggregate_failures"

gitlab-qa-bot requested to merge github/fork/samuel-hcl/agg_fail_html into master

Created by: samuel-hcl

This is a possible fix for #2319 (closed). If someone knows a better way to output the failure details in the html formatter, please let me know.

What I did is get the failure details from failure.fully_formatted method and then formatting the string (removing color codes and removing the first line that display the example name because it would be duplicated in the html formatter) only if the exception is a MultipleExpectationsNotMetError or MultipleExceptionError. For other exceptions, the behavior is not modified.

I have also added the tests and updated the expected output for the formatters.

Merge request reports