Exception: Minitest::Assertion
- Defined in:
- opal/stdlib/minitest.rb
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
#error ⇒ Object
:nodoc:
641 642 643 |
# File 'opal/stdlib/minitest.rb', line 641 def error # :nodoc: self end |
#location ⇒ Object
Where was this run before an assertion was raised?
648 649 650 651 652 653 654 655 |
# File 'opal/stdlib/minitest.rb', line 648 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:
657 658 659 |
# File 'opal/stdlib/minitest.rb', line 657 def result_code # :nodoc: result_label[0, 1] end |
#result_label ⇒ Object
:nodoc:
661 662 663 |
# File 'opal/stdlib/minitest.rb', line 661 def result_label # :nodoc: "Failure" end |