Sha256: 9f0186a1747e7e7acd00af3d0cfbeee036e393ba0d58fab4e5b70b4c48798517
Contents?: true
Size: 622 Bytes
Versions: 2
Compression:
Stored size: 622 Bytes
Contents
# frozen_string_literal: true describe Noths::Configuration do let(:config) { Noths::Configuration.default } before do Noths.configure do |c| c.scheme = 'https' c.host = 'api.example.com' c.base_path = '/v1' end end describe '#base_url' do it 'should have the default value' do expect(config.base_url).to eq("https://api.example.com/v1") end it 'should remove trailing slashes' do [nil, '', '/', '//'].each do |base_path| config.base_path = base_path expect(config.base_url).to eq("https://api.example.com") end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
noths-0.2.1 | spec/configuration_spec.rb |
noths-0.2.0 | spec/configuration_spec.rb |