In Files

  • minitest-5.13.0/lib/minitest.rb

Parent

Methods

Minitest::Assertion

Represents run failures.

Public Instance Methods

location() click to toggle source

Where was this run before an assertion was raised?

 
               # File minitest-5.13.0/lib/minitest.rb, line 879
def location
  last_before_assertion = ""
  self.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