Sha256: fef0f44b45741994254bd1424c4c191241f2a593014779695125e6cd62d0eea4

Contents?: true

Size: 697 Bytes

Versions: 32

Compression:

Stored size: 697 Bytes

Contents

require "spec_helper"

gem_path = "/opt/chef/embedded/bin/gem"
white_list = %w{addressable chef-config json minitest rake}

describe "gem list" do
  it "should not have non-whitelisted duplicate gems" do
    gems = command("#{gem_path} list").stdout

    duplicate_gems = gems.lines().select { |l| l.include?(",") }.collect { |l| l.split(" ").first }
    puts "Duplicate gems found: #{duplicate_gems}" if duplicate_gems.length > 0

    non_whitelisted_duplicates = duplicate_gems.select { |l| !white_list.include?(l) }
    puts "Non white listed duplicates: #{non_whitelisted_duplicates}" if non_whitelisted_duplicates.length > 0

    (non_whitelisted_duplicates.length).should be == 0
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
chef-13.11.3 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.10.4 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.10.0 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.9.4 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-14.2.0 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-14.1.12 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-14.1.1 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.9.1 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-14.0.202-universal-mingw32 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-14.0.202 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-14.0.190 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.8.5 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.8.3 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.8.0 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.7.16-universal-mingw32 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.7.16 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.6.4-universal-mingw32 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.6.4 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.6.0-universal-mingw32 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb
chef-13.6.0 acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb