diff --git a/lib/cucumber/formatter/html.rb b/lib/cucumber/formatter/html.rb index dfb6fb259c..0abbac6f92 100644 --- a/lib/cucumber/formatter/html.rb +++ b/lib/cucumber/formatter/html.rb @@ -378,6 +378,11 @@ def build_exception_detail(exception) matches = message.match(/([^(\/)]+)<\//m) message = matches ? matches[1] : "" end + + unless exception.instance_of?(RuntimeError) + message << " (#{exception.class})" + end + @builder.pre do @builder.text!(message) end