Sha256: a9df9608f90627b6b4a57336b85e146910d74871f50dc80f42b17fb44237dc3e
Contents?: true
Size: 649 Bytes
Versions: 2
Compression:
Stored size: 649 Bytes
Contents
# frozen_string_literal: true describe {{moduleName}}::Configuration do let(:config) { {{moduleName}}::Configuration.default } before do {{moduleName}}.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 | templates/configuration_spec.mustache |
noths-0.2.0 | templates/configuration_spec.mustache |