Sha256: e24e2a3ab3fcf12f94a9d3df99f614c37700fcc75796d99b21b0fd5a23be8f4c

Contents?: true

Size: 1.36 KB

Versions: 14

Compression:

Stored size: 1.36 KB

Contents

require 'system/spec_helper'

describe 'installing modules from the forge' do

  describe 'when no version is specified' do

    include_context 'system module installation'

    before(:all) do
      shell %[echo 'mod "adrien/boolean"' > ./Puppetfile]
      shell %[r10k puppetfile install]
    end

    describe file('modules/boolean/metadata.json') do
      its(:content) { should match /adrien-boolean/ }
      its(:content) { should match /version.*1\.0\.1/ }
    end
  end

  describe 'when a specific version is specified' do

    include_context 'system module installation'

    before(:all) do
      shell %[echo 'mod "adrien/boolean", "0.9.0"' > ./Puppetfile]
      shell %[r10k puppetfile install]
    end

    describe file('modules/boolean/metadata.json') do
      its(:content) { should match /adrien-boolean/ }
      its(:content) { should match /version.*0\.9\.0/ }
    end
  end

  describe 'when the latest version is requested' do

    include_context 'system module installation'

    before(:all) do
      shell %[echo 'mod "adrien/boolean", "0.9.0"' > ./Puppetfile]
      shell %[r10k puppetfile install]
      shell %[echo 'mod "adrien/boolean", :latest' > ./Puppetfile]
    end

    it 'upgrades to the latest version' do
      shell %[r10k puppetfile install]

      expect(file('modules/boolean/metadata.json').content).to match /version.*1\.0\.1/
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
r10k-1.3.5 spec/system/module/forge/install_spec.rb
r10k-1.3.4 spec/system/module/forge/install_spec.rb
r10k-1.2.4 spec/system/module/forge/install_spec.rb
r10k-1.3.3 spec/system/module/forge/install_spec.rb
r10k-1.3.2 spec/system/module/forge/install_spec.rb
r10k-1.2.3 spec/system/module/forge/install_spec.rb
r10k-1.3.1 spec/system/module/forge/install_spec.rb
r10k-1.2.2 spec/system/module/forge/install_spec.rb
r10k-1.3.0 spec/system/module/forge/install_spec.rb
r10k-1.3.0rc1 spec/system/module/forge/install_spec.rb
r10k-1.2.1 spec/system/module/forge/install_spec.rb
r10k-1.2.0 spec/system/module/forge/install_spec.rb
r10k-1.2.0rc2 spec/system/module/forge/install_spec.rb
r10k-1.2.0rc1 spec/system/module/forge/install_spec.rb