Sha256: 2c1964242fec46a377fe7635ef45e81f1ad1855cd5a69bec3b06033974c0df50
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
require 'spec_helper' describe Sdk4me do it "should define a default configuration" do conf = Sdk4me.configuration.current expect(conf.keys.sort).to eq([:account, :api_token, :api_version, :block_at_rate_limit, :ca_file, :host, :logger, :max_retry_time, :proxy_host, :proxy_password, :proxy_port, :proxy_user, :read_timeout, :source]) expect(conf[:logger].class).to eq(::Logger) expect(conf[:host]).to eq('https://api.4me.com') expect(conf[:api_version]).to eq('v1') expect(conf[:max_retry_time]).to eq(5400) expect(conf[:read_timeout]).to eq(25) expect(conf[:block_at_rate_limit]).to be_falsey expect(conf[:proxy_port]).to eq(8080) [:api_token, :account, :source, :proxy_host, :proxy_user, :proxy_password].each do |no_default| expect(conf[no_default]).to be_nil end expect(conf[:ca_file]).to eq('../ca-bundle.crt') end it "should define a logger" do expect(Sdk4me.logger.class).to eq(::Logger) end it "should define an exception class" do expect { raise ::Sdk4me::Exception.new('test') }.to raise_error('test') end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
4me-sdk-1.1.5 | spec/lib/sdk4me_spec.rb |
4me-sdk-1.1.4 | spec/lib/sdk4me_spec.rb |
4me-sdk-1.1.3 | spec/lib/sdk4me_spec.rb |