Class: Assert::Result::Error
- Defined in:
- lib/assert/result.rb,
lib/assert/result.rb
Class Method Summary collapse
-
.for_test(test, err) ⇒ Object
error results are generated by raising exceptions in tests.
- .name ⇒ Object
- .type ⇒ Object
Methods inherited from Base
#==, #backtrace, #file_line, #file_name, #initialize, #inspect, #line_num, #message, #name, #output, #set_backtrace, #set_with_bt, #src_line, #test_file_line, #test_file_name, #test_id, #test_line_num, #test_name, #to_s, #to_sym, #trace, #type, #with_bt_set?
Constructor Details
This class inherits a constructor from Assert::Result::Base
Class Method Details
.for_test(test, err) ⇒ Object
error results are generated by raising exceptions in tests
281 282 283 284 285 286 287 |
# File 'lib/assert/result.rb', line 281 def self.for_test(test, err) if err.is_a?(Exception) super(test, "#{err.} (#{err.class.name})", err.backtrace) else raise ArgumentError, "generate error results by raising an exception" end end |
.name ⇒ Object
276 277 278 |
# File 'lib/assert/result.rb', line 276 def self.name "Error" end |
.type ⇒ Object
272 273 274 |
# File 'lib/assert/result.rb', line 272 def self.type :error end |