Module: Mocha::Integration::MiniTest
- Defined in:
- lib/mocha/integration/mini_test/version_13.rb,
lib/mocha/integration/mini_test/version_140.rb,
lib/mocha/integration/mini_test/version_141.rb,
lib/mocha/integration/mini_test/assertion_counter.rb,
lib/mocha/integration/mini_test/exception_translation.rb,
lib/mocha/integration/mini_test/version_142_and_above.rb
Defined Under Namespace
Modules: Version13, Version140, Version141, Version142AndAbove Classes: AssertionCounter
Class Method Summary collapse
Class Method Details
.translate(exception) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/mocha/integration/mini_test/exception_translation.rb', line 9 def self.translate(exception) return exception unless exception.kind_of?(::Mocha::ExpectationError) translated_exception = ::MiniTest::Assertion.new(exception.) translated_exception.set_backtrace(exception.backtrace) translated_exception end |