123456789_123456789_123456789_123456789_123456789_

Exception: Minitest::Assertion

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Exception
Instance Chain:
self, Exception
Inherits: Exception
  • ::Object
Defined in: lib/minitest.rb

Overview

Represents run failures.

Instance Method Summary

Instance Method Details

#error

This method is for internal use only.
[ GitHub ]

  
# File 'lib/minitest.rb', line 816

def error # :nodoc:
  self
end

#location

Where was this run before an assertion was raised?

[ GitHub ]

  
# File 'lib/minitest.rb', line 823

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

#result_code

This method is for internal use only.
[ GitHub ]

  
# File 'lib/minitest.rb', line 832

def result_code # :nodoc:
  result_label[0, 1]
end

#result_label

This method is for internal use only.
[ GitHub ]

  
# File 'lib/minitest.rb', line 836

def result_label # :nodoc:
  "Failure"
end