Sha256: 62246ee28c16520f67ab7a66313ab3c0dafa685faf2f5155958bb8e5ba109d9f

Contents?: true

Size: 336 Bytes

Versions: 28

Compression:

Stored size: 336 Bytes

Contents

module Mocha

  class ExceptionRaiser

    def initialize(exception, message)
      @exception, @message = exception, 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

28 entries across 24 versions & 5 rubygems

Version Path
mocha-1.6.0 lib/mocha/exception_raiser.rb
mocha-1.5.0 lib/mocha/exception_raiser.rb
mocha-1.4.0 lib/mocha/exception_raiser.rb
mocha-1.3.0 lib/mocha/exception_raiser.rb
mocha-1.2.1 lib/mocha/exception_raiser.rb
mocha-1.2.0 lib/mocha/exception_raiser.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/mocha-1.0.0/lib/mocha/exception_raiser.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/mocha-1.0.0/lib/mocha/exception_raiser.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/mocha-1.0.0/lib/mocha/exception_raiser.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/mocha-1.0.0/lib/mocha/exception_raiser.rb
mocha-1.1.0 lib/mocha/exception_raiser.rb
mocha-1.0.0 lib/mocha/exception_raiser.rb
mocha-1.0.0.alpha lib/mocha/exception_raiser.rb
tnargav-1.3.3 vendor/bundle/ruby/1.9.1/gems/mocha-0.14.0/lib/mocha/exception_raiser.rb
challah-1.0.0 vendor/bundle/gems/mocha-0.14.0/lib/mocha/exception_raiser.rb
tnargav-1.2.3 vendor/bundle/ruby/1.9.1/gems/mocha-0.14.0/lib/mocha/exception_raiser.rb
mocha-0.14.0 lib/mocha/exception_raiser.rb
challah-1.0.0.beta3 vendor/bundle/gems/mocha-0.13.3/lib/mocha/exception_raiser.rb
mocha-0.14.0.alpha lib/mocha/exception_raiser.rb
challah-1.0.0.beta2 vendor/bundle/gems/mocha-0.13.3/lib/mocha/exception_raiser.rb