Exception: Minitest::UnexpectedError
- Defined in:
- lib/minitest.rb
Overview
Assertion wrapping an unexpected error that was raised during a run.
Instance Attribute Summary collapse
-
#error ⇒ Object
TODO: figure out how to use ‘cause` instead.
Instance Method Summary collapse
-
#backtrace ⇒ Object
:nodoc:.
-
#initialize(error) ⇒ UnexpectedError
constructor
:nodoc:.
-
#message ⇒ Object
:nodoc:.
-
#result_label ⇒ Object
:nodoc:.
Methods inherited from Assertion
Constructor Details
#initialize(error) ⇒ UnexpectedError
:nodoc:
951 952 953 954 |
# File 'lib/minitest.rb', line 951 def initialize error # :nodoc: super "Unexpected exception" self.error = error end |
Instance Attribute Details
#error ⇒ Object
TODO: figure out how to use ‘cause` instead
949 950 951 |
# File 'lib/minitest.rb', line 949 def error @error end |
Instance Method Details
#backtrace ⇒ Object
:nodoc:
956 957 958 |
# File 'lib/minitest.rb', line 956 def backtrace # :nodoc: self.error.backtrace end |
#message ⇒ Object
:nodoc:
960 961 962 963 |
# File 'lib/minitest.rb', line 960 def # :nodoc: bt = Minitest.filter_backtrace(self.backtrace).join "\n " "#{self.error.class}: #{self.error.}\n #{bt}" end |
#result_label ⇒ Object
:nodoc:
965 966 967 |
# File 'lib/minitest.rb', line 965 def result_label # :nodoc: "Error" end |