Exception: Minitest::Assertion
Overview
Represents run failures.
Direct Known Subclasses
Instance Method Summary collapse
-
#error ⇒ Object
:nodoc:.
-
#location ⇒ Object
Where was this run before an assertion was raised?.
-
#result_code ⇒ Object
:nodoc:.
-
#result_label ⇒ Object
:nodoc:.
Instance Method Details
#location ⇒ Object
Where was this run before an assertion was raised?
702 703 704 705 706 707 708 709 |
# File 'lib/minitest.rb', line 702 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 ⇒ Object
:nodoc:
711 712 713 |
# File 'lib/minitest.rb', line 711 def result_code # :nodoc: result_label[0, 1] end |
#result_label ⇒ Object
:nodoc:
715 716 717 |
# File 'lib/minitest.rb', line 715 def result_label # :nodoc: "Failure" end |