Exception: Minitest::UnexpectedError
- Defined in:
- lib/minitest.rb
Overview
Assertion wrapping an unexpected error that was raised during a run.
Instance Attribute Summary collapse
-
#exception ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#backtrace ⇒ Object
:nodoc:.
-
#error ⇒ Object
:nodoc:.
-
#initialize(exception) ⇒ UnexpectedError
constructor
:nodoc:.
-
#message ⇒ Object
:nodoc:.
-
#result_label ⇒ Object
:nodoc:.
Methods inherited from Assertion
Constructor Details
#initialize(exception) ⇒ UnexpectedError
:nodoc:
735 736 737 738 |
# File 'lib/minitest.rb', line 735 def initialize exception # :nodoc: super "Unexpected exception" self.exception = exception end |
Instance Attribute Details
#exception ⇒ Object
:nodoc:
733 734 735 |
# File 'lib/minitest.rb', line 733 def exception @exception end |
Instance Method Details
#backtrace ⇒ Object
:nodoc:
740 741 742 |
# File 'lib/minitest.rb', line 740 def backtrace # :nodoc: self.exception.backtrace end |
#error ⇒ Object
:nodoc:
744 745 746 |
# File 'lib/minitest.rb', line 744 def error # :nodoc: self.exception end |
#message ⇒ Object
:nodoc:
748 749 750 751 |
# File 'lib/minitest.rb', line 748 def # :nodoc: bt = Minitest.filter_backtrace(self.backtrace).join "\n " "#{self.exception.class}: #{self.exception.}\n #{bt}" end |
#result_label ⇒ Object
:nodoc:
753 754 755 |
# File 'lib/minitest.rb', line 753 def result_label # :nodoc: "Error" end |