Sha256: 22b36722eaf529d952971f1768f91d8e989f5aa7f19f34ca510e7a54bfded44a
Contents?: true
Size: 577 Bytes
Versions: 2
Compression:
Stored size: 577 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Valvat::Options do describe '#[]' do it 'returns global config by default' do expect(described_class.new({})[:uk]).to be(false) end it 'returns option if set' do expect(described_class.new({ uk: true })[:uk]).to be(true) end context 'when options contains deprecated key' do let(:options) { described_class.new({ requester_vat: 'DE123' }, silence: true) } it 'returns it on new key' do expect(options[:requester]).to be('DE123') end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
valvat-1.4.1 | spec/valvat/options_spec.rb |
valvat-1.4.0 | spec/valvat/options_spec.rb |