Sha256: a4db07005e4ec0efc007e25e30090217af75f87fd683856055107461f7cd2ffa
Contents?: true
Size: 948 Bytes
Versions: 1
Compression:
Stored size: 948 Bytes
Contents
# frozen_string_literal: true RSpec.describe FinAppsCore::REST::Defaults do let(:fake_class) { Class.new } describe 'set constants' do before { stub_const(described_class.to_s, fake_class) } it('sets API_VERSION') { expect(described_class::API_VERSION).to eq '2' } it('sets DEFAULTS') { expect(described_class::DEFAULTS).to be_a(Hash) } it('freezes DEFAULTS') { expect(described_class::DEFAULTS).to be_frozen } it('sets DEFAULTS[:host]') { expect(described_class::DEFAULTS[:host]).to eq 'https://api.financialapps.com' } it('sets DEFAULTS[:timeout]') { expect(described_class::DEFAULTS[:timeout]).to eq 30 } it('does not set DEFAULTS[:proxy]') { expect(described_class::DEFAULTS[:proxy]).to be_nil } it('sets DEFAULTS[:retry_limit]') { expect(described_class::DEFAULTS[:retry_limit]).to eq 1 } it('sets DEFAULTS[:log_level]') { expect(described_class::DEFAULTS[:log_level]).to eq Logger::INFO } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
finapps_core-2.1.2 | spec/rest/defaults_spec.rb |