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:
706 707 708 709 |
# File 'lib/minitest.rb', line 706 def initialize exception # :nodoc: super "Unexpected exception" self.exception = exception end |
Instance Attribute Details
#exception ⇒ Object
:nodoc:
704 705 706 |
# File 'lib/minitest.rb', line 704 def exception @exception end |
Instance Method Details
#backtrace ⇒ Object
:nodoc:
711 712 713 |
# File 'lib/minitest.rb', line 711 def backtrace # :nodoc: self.exception.backtrace end |
#error ⇒ Object
:nodoc:
715 716 717 |
# File 'lib/minitest.rb', line 715 def error # :nodoc: self.exception end |
#message ⇒ Object
:nodoc:
719 720 721 722 |
# File 'lib/minitest.rb', line 719 def # :nodoc: bt = Minitest.filter_backtrace(self.backtrace).join "\n " "#{self.exception.class}: #{self.exception.}\n #{bt}" end |
#result_label ⇒ Object
:nodoc:
724 725 726 |
# File 'lib/minitest.rb', line 724 def result_label # :nodoc: "Error" end |