Sha256: 9859ffaee29f09c35b4f80c1bf354559f7df7d665375951a744efc79b8224e16

Contents?: true

Size: 338 Bytes

Versions: 5

Compression:

Stored size: 338 Bytes

Contents

module Mocha
  class ExceptionRaiser
    def initialize(exception, message)
      @exception = exception
      @message = message
    end

    def evaluate
      raise @exception, @exception.to_s if @exception.is_a?(Module) && (@exception < Interrupt)
      raise @exception, @message if @message
      raise @exception
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
mocha-1.9.0 lib/mocha/exception_raiser.rb
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/mocha-1.8.0/lib/mocha/exception_raiser.rb
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/mocha-1.8.0/lib/mocha/exception_raiser.rb
mocha-1.8.0 lib/mocha/exception_raiser.rb
mocha-1.7.0 lib/mocha/exception_raiser.rb