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
|
Defined in: | lib/minitest.rb |
Overview
Represents run failures.
Constant Summary
-
RE =
Internal use only
# File 'lib/minitest.rb', line 1020/in [`'](?:[^']+[#.])?(?:assert|refute|flunk|pass|fail|raise|must|wont)/
Instance Method Summary
-
#location
Where was this run before an assertion was raised?
- #error Internal use only
- #result_code Internal use only
- #result_label Internal use only
Instance Method Details
#error
This method is for internal use only.
[ GitHub ]
# File 'lib/minitest.rb', line 1022
def error # :nodoc: self end
#location
Where was this run before an assertion was raised?
# File 'lib/minitest.rb', line 1029
def location bt = Minitest.filter_backtrace self.backtrace idx = bt.rindex { |s| s.match? RE } || -1 # fall back to first item loc = bt[idx+1] || bt.last || "unknown:-1" loc.sub(/:in .*$/, "") end
#result_code
This method is for internal use only.
[ GitHub ]
# File 'lib/minitest.rb', line 1037
def result_code # :nodoc: result_label[0, 1] end
#result_label
This method is for internal use only.
[ GitHub ]
# File 'lib/minitest.rb', line 1041
def result_label # :nodoc: "Failure" end