Sha256: 4a4aa61215eb88d3a4379d6eeddccb38a0cf8d0b2606c3994c99e4aa4713a94d

Contents?: true

Size: 649 Bytes

Versions: 1

Compression:

Stored size: 649 Bytes

Contents

require "test_helper"

class RemotelyExceptional::ExceptionsTest < RemotelyExceptional::TestCase
  exception = RemotelyExceptional::InvalidHandlerResponse
  context exception.name do
    subject { exception }
    context "#original_exception" do
      should "capture the original exception if one exists" do
        assert_nil subject.new.original_exception
        exception = ArgumentError
        rescued = false
        begin
          raise exception
        rescue exception
          rescued = true
          assert_kind_of exception, subject.new.original_exception
        end
        assert_equal true, rescued
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
remotely_exceptional-0.0.1 test/unit/exceptions_test.rb