Sha256: c7ed0c2075aa522bfb16418b329a455504d15487515e20f8ac803183ee6301f9

Contents?: true

Size: 582 Bytes

Versions: 4

Compression:

Stored size: 582 Bytes

Contents

require 'spec_helper'

describe Correios::CEP do
  describe "#request_timeout" do
    it "default is 5" do
      expect(Correios::CEP.request_timeout).to eql 5
    end

    context "when set timeout" do
      it "returns timeout" do
        Correios::CEP.configure { |config| config.request_timeout = 3 }
        expect(Correios::CEP.request_timeout).to eql 3
      end

      it "returns timeout in seconds (integer)" do
        Correios::CEP.configure { |config| config.request_timeout = 2.123 }
        expect(Correios::CEP.request_timeout).to eql 2
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
correios-cep-0.3.1 spec/correios/cep_spec.rb
correios-cep-0.3.0 spec/correios/cep_spec.rb
correios-cep-0.2.0 spec/correios/cep_spec.rb
correios-cep-0.1.4 spec/correios/cep_spec.rb