From b835063057201e9e51975a05e7db5a3d8533f7c6 Mon Sep 17 00:00:00 2001 From: Nikita Date: Tue, 28 Jun 2011 02:52:31 -0700 Subject: [PATCH] Cucumber fails on nil and does not print out failed tests (impossible to react on unsuccessful build). --- lib/cucumber/formatter/html.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cucumber/formatter/html.rb b/lib/cucumber/formatter/html.rb index 5cdb96dc6d..8636318328 100644 --- a/lib/cucumber/formatter/html.rb +++ b/lib/cucumber/formatter/html.rb @@ -373,8 +373,8 @@ def build_exception_detail(exception) @builder.div(:class => 'message') do message = exception.message if defined?(RAILS_ROOT) && message.include?('Exception caught') - matches = message.match(/Showing (.+)<\/i>(?:.+)#(\d+)/) - backtrace += ["#{RAILS_ROOT}/#{matches[1]}:#{matches[2]}"] + matches = message.match(/Showing (.+)<\/i>(?:.+) #(\d+)/) + backtrace += ["#{RAILS_ROOT}/#{matches[1]}:#{matches[2]}"] if matches message = message.match(/([^(\/)]+)<\//m)[1] end @builder.pre do