Sha256: cc165922aa7574299cd56c547b0f14fc87727d5287507427a19ba13588a7e94e

Contents?: true

Size: 409 Bytes

Versions: 10

Compression:

Stored size: 409 Bytes

Contents

require 'mocha/expectation_error'

module Mocha

  module MonkeyPatching

    module MiniTest

      def self.translate(exception)
        return exception unless exception.kind_of?(::Mocha::ExpectationError)
        translated_exception = ::MiniTest::Assertion.new(exception.message)
        translated_exception.set_backtrace(exception.backtrace)
        translated_exception
      end

    end

  end

end

Version data entries

10 entries across 8 versions & 3 rubygems

Version Path
challah-rolls-0.2.0 vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/exception_translation.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/exception_translation.rb
challah-rolls-0.1.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/exception_translation.rb
challah-rolls-0.1.0 vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/exception_translation.rb
challah-0.8.0.pre vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/exception_translation.rb
challah-0.7.1 vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/exception_translation.rb
challah-0.7.0 vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/exception_translation.rb
challah-0.7.0.pre2 vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/exception_translation.rb
challah-0.7.0.pre vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/exception_translation.rb
mocha-0.12.2 lib/mocha/monkey_patching/mini_test/exception_translation.rb