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, #set_backtrace, #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
155 156 157 158 159 160 161 |
# File 'lib/assert/result.rb', line 155 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
152 |
# File 'lib/assert/result.rb', line 152 def self.name; 'Error'; end |
.type ⇒ Object
151 |
# File 'lib/assert/result.rb', line 151 def self.type; :error; end |