Sha256: 8e5bb14981eab3e57814a621ffd215c3ff6d7ca9e38bd58d201f760029f74acc

Contents?: true

Size: 567 Bytes

Versions: 21

Compression:

Stored size: 567 Bytes

Contents

require 'spec_helper'
require 'uri'

RSpec.describe PuppetForge do
  describe 'host attribute' do
    after(:each) do
      PuppetForge.host = PuppetForge::DEFAULT_FORGE_HOST
    end

    it 'should add a trailing slash if not present' do
      PuppetForge.host = 'http://example.com'

      expect(PuppetForge.host[-1,1]).to eq '/'
    end

    it 'should coerce non-String values if possible' do
      PuppetForge.host = URI.parse('http://example.com')

      expect(PuppetForge.host).to be_a String
      expect(PuppetForge.host[-1,1]).to eq '/'
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
puppet_forge-6.0.0 spec/unit/puppet_forge_spec.rb
puppet_forge-5.0.4 spec/unit/puppet_forge_spec.rb
puppet_forge-5.0.3 spec/unit/puppet_forge_spec.rb
puppet_forge-5.0.2 spec/unit/puppet_forge_spec.rb
puppet_forge-5.0.1 spec/unit/puppet_forge_spec.rb
puppet_forge-5.0.0 spec/unit/puppet_forge_spec.rb
puppet_forge-4.1.0 spec/unit/puppet_forge_spec.rb
puppet_forge-4.0.0 spec/unit/puppet_forge_spec.rb
puppet_forge-3.2.0 spec/unit/puppet_forge_spec.rb
puppet_forge-3.1.0 spec/unit/puppet_forge_spec.rb
puppet_forge-3.0.0 spec/unit/puppet_forge_spec.rb
puppet_forge-2.3.4 spec/unit/puppet_forge_spec.rb
puppet_forge-2.3.3 spec/unit/puppet_forge_spec.rb
puppet_forge-2.3.2 spec/unit/puppet_forge_spec.rb
puppet_forge-2.3.1 spec/unit/puppet_forge_spec.rb
puppet_forge-2.3.0 spec/unit/puppet_forge_spec.rb
puppet_forge-2.3.0.rc1 spec/unit/puppet_forge_spec.rb
puppet_forge-2.2.9 spec/unit/puppet_forge_spec.rb
puppet_forge-2.2.8 spec/unit/puppet_forge_spec.rb
puppet_forge-2.2.7 spec/unit/puppet_forge_spec.rb