Sha256: 25a766d7b7340f7a598efeaa01a55cd565e111baf885c62a9e1b2ac7527357ab

Contents?: true

Size: 471 Bytes

Versions: 4

Compression:

Stored size: 471 Bytes

Contents

require 'helper'

describe Twitter::Error do

  describe "#initialize" do
    it "wraps another error class" do
      begin
        raise Faraday::Error::ClientError.new("Oups")
      rescue Faraday::Error::ClientError
        begin
          raise Twitter::Error
        rescue Twitter::Error => error
          expect(error.message).to eq "Oups"
          expect(error.wrapped_exception.class).to eq Faraday::Error::ClientError
        end
      end
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twitter-4.3.0 spec/twitter/error_spec.rb
twitter-4.2.0 spec/twitter/error_spec.rb
twitter-4.1.2 spec/twitter/error_spec.rb
twitter-4.1.1 spec/twitter/error_spec.rb