Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #95 from nikitachernov/patch-1

Cucumber fails on nil and does not print out failed tests
  • Loading branch information...
commit 7b6bc85124ab7503dbd5128f2544330455ae2734 2 parents 7f6030b + b835063
@aslakhellesoy aslakhellesoy authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/cucumber/formatter/html.rb
View
4 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>(.+)<\/i>(?:.+)#(\d+)/)
- backtrace += ["#{RAILS_ROOT}/#{matches[1]}:#{matches[2]}"]
+ matches = message.match(/Showing <i>(.+)<\/i>(?:.+) #(\d+)/)
+ backtrace += ["#{RAILS_ROOT}/#{matches[1]}:#{matches[2]}"] if matches
message = message.match(/<code>([^(\/)]+)<\//m)[1]
end
@builder.pre do
Please sign in to comment.
Something went wrong with that request. Please try again.