Class: Assert::Result::Error
- Defined in:
- lib/assert/result.rb,
lib/assert/result.rb
Class Method Summary collapse
-
.for_test(test, exception) ⇒ Object
error results are generated by raising exceptions in tests.
- .name ⇒ Object
- .type ⇒ Object
Methods inherited from Base
#==, #backtrace, #data, #initialize, #inspect, #message, #name, #output, #set_backtrace, #test_id, #test_name, #to_s, #to_sym, #trace, #type
Constructor Details
This class inherits a constructor from Assert::Result::Base
Class Method Details
.for_test(test, exception) ⇒ Object
error results are generated by raising exceptions in tests
161 162 163 164 165 166 167 |
# File 'lib/assert/result.rb', line 161 def self.for_test(test, exception) if exception.kind_of?(Exception) super(test, "#{exception.} (#{exception.class.name})", exception.backtrace) else raise ArgumentError, "generate error results by raising an exception" end end |
.name ⇒ Object
158 |
# File 'lib/assert/result.rb', line 158 def self.name; 'Error'; end |
.type ⇒ Object
157 |
# File 'lib/assert/result.rb', line 157 def self.type; :error; end |