class Mocha::ExpectationErrorFactory
@see Mocha::Integration::Minitest::Adapter
For example, it is used by Mocha::Integration::Minitest::Adapter
in order to have Mocha raise a Minitest::Assertion
which can then be sensibly handled by Minitest::Unit::TestCase
.
This class should only be used by authors of test libraries and not by typical “users” of Mocha.
This factory determines what class of exception should be raised when Mocha detects a test failure.
def build(message = nil, backtrace = [])
- Private: -
def build(message = nil, backtrace = []) exception = exception_class.new(message) filter = BacktraceFilter.new exception.set_backtrace(filter.filtered(backtrace)) exception end