Class: CI::Reporter::FailureCore

Inherits:
Object
  • Object
show all
Defined in:
lib/ci/reporter/minitest.rb

Direct Known Subclasses

MiniTestError, MiniTestFailure, MiniTestSkipped

Instance Method Summary collapse

Instance Method Details

#location(e) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/ci/reporter/minitest.rb', line 20

def location(e)
  last_before_assertion = ""
  e.backtrace.reverse_each do |s|
    break if s =~ /in .(assert|refute|flunk|pass|fail|raise|must|wont)/
    last_before_assertion = s
  end
  last_before_assertion.sub(/:in .*$/, '')
end