Method: Contract.fault_to_exception
- Defined in:
- lib/contract/exception.rb
.fault_to_exception(fault, *args) ⇒ Object
Maps a Test::Unit fault (either a Failure or Error) to an actual exception with the specified meta data.
83 84 85 86 87 88 89 |
# File 'lib/contract/exception.rb', line 83 def self.fault_to_exception(fault, *args) # :nodoc: if fault.is_a?(Test::Unit::Failure) then failure_to_exception(fault, *args) else error_to_exception(fault, *args) end end |