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:
856 857 858 859 |
# File 'lib/minitest.rb', line 856 def initialize exception # :nodoc: super "Unexpected exception" self.exception = exception end |
Instance Attribute Details
#exception ⇒ Object
:nodoc:
854 855 856 |
# File 'lib/minitest.rb', line 854 def exception @exception end |
Instance Method Details
#backtrace ⇒ Object
:nodoc:
861 862 863 |
# File 'lib/minitest.rb', line 861 def backtrace # :nodoc: self.exception.backtrace end |
#error ⇒ Object
:nodoc:
865 866 867 |
# File 'lib/minitest.rb', line 865 def error # :nodoc: self.exception end |
#message ⇒ Object
:nodoc:
869 870 871 872 |
# File 'lib/minitest.rb', line 869 def # :nodoc: bt = Minitest.filter_backtrace(self.backtrace).join "\n " "#{self.exception.class}: #{self.exception.}\n #{bt}" end |
#result_label ⇒ Object
:nodoc:
874 875 876 |
# File 'lib/minitest.rb', line 874 def result_label # :nodoc: "Error" end |