Sha256: afb517ab22e4e4b2512fd10da8e060df4de7daa3130807770a80f822ae8c3e51

Contents?: true

Size: 386 Bytes

Versions: 36

Compression:

Stored size: 386 Bytes

Contents

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

    def evaluate(invocation)
      invocation.raised(@exception)
      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

36 entries across 36 versions & 2 rubygems

Version Path
mocha-2.7.1 lib/mocha/exception_raiser.rb
mocha-2.7.0 lib/mocha/exception_raiser.rb
mocha-2.6.1 lib/mocha/exception_raiser.rb
mocha-2.6.0 lib/mocha/exception_raiser.rb
mocha-2.5.0 lib/mocha/exception_raiser.rb
mocha-2.4.5 lib/mocha/exception_raiser.rb
mocha-2.4.4 lib/mocha/exception_raiser.rb
mocha-2.4.3 lib/mocha/exception_raiser.rb
mocha-2.4.2 lib/mocha/exception_raiser.rb
mocha-2.4.1 lib/mocha/exception_raiser.rb
mocha-2.4.0 lib/mocha/exception_raiser.rb
mocha-2.2.0 lib/mocha/exception_raiser.rb
mocha-2.1.0 lib/mocha/exception_raiser.rb
mocha-2.0.4 lib/mocha/exception_raiser.rb
mocha-2.0.3 lib/mocha/exception_raiser.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/mocha-2.0.2/lib/mocha/exception_raiser.rb
mocha-2.0.2 lib/mocha/exception_raiser.rb
mocha-1.16.1 lib/mocha/exception_raiser.rb
mocha-1.15.1 lib/mocha/exception_raiser.rb
mocha-2.0.1 lib/mocha/exception_raiser.rb