From d2326c4b12a1d207681dccbff181bf80a04ff7c5 Mon Sep 17 00:00:00 2001 From: Jari Bakken Date: Fri, 21 Oct 2011 16:29:39 +0200 Subject: [PATCH] Show the class name of exceptions in the HTML formatter. --- lib/cucumber/formatter/html.rb | 5 +++++ 1 file changed, 5 insertions(+) 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