module Minitest::MockRaiseError
A module that interrupts the method_missing
return value and raises error if return value is a Exception. This module is expected to be prepended to Minitest::Mock.
Constants
- VERSION
Private Instance Methods
method_missing(_method_name, *_args, &_block)
click to toggle source
Calls superclass method
# File lib/minitest/mock_raise_error.rb, line 12 def method_missing(_method_name, *_args, &_block) super.tap do |ret_val| raise ret_val if ret_val.is_a?(Exception) raise ret_val if ret_val.is_a?(Class) && ret_val <= Exception end end