github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/openapi-generator/templates/ruby-client/configuration_spec.mustache (about) 1 require 'spec_helper' 2 3 describe {{moduleName}}::Configuration do 4 let(:config) { {{moduleName}}::Configuration.default } 5 6 before(:each) do 7 # uncomment below to setup host and base_path 8 # require 'URI' 9 # uri = URI.parse("{{{basePath}}}") 10 # {{moduleName}}.configure do |c| 11 # c.host = uri.host 12 # c.base_path = uri.path 13 # end 14 end 15 16 describe '#base_url' do 17 it 'should have the default value' do 18 # uncomment below to test default value of the base path 19 # expect(config.base_url).to eq("{{{basePath}}}") 20 end 21 22 it 'should remove trailing slashes' do 23 [nil, '', '/', '//'].each do |base_path| 24 config.base_path = base_path 25 # uncomment below to test trailing slashes 26 # expect(config.base_url).to eq("{{{basePath}}}") 27 end 28 end 29 end 30 end