Sha256: fff07191b8404b47d289ac1c2c619115c7117cfc9fea5ff3e6384dfcb37a2025

Contents?: true

Size: 884 Bytes

Versions: 35

Compression:

Stored size: 884 Bytes

Contents

#!/usr/bin/env rspec
require 'spec_helper'

describe Puppet::Type.type(:package), "when choosing a default package provider" do
  before do
    # the default provider is cached.
    Puppet::Type.type(:package).defaultprovider = nil
  end

  def provider_name(os)
    {"Ubuntu" => :apt, "Debian" => :apt, "Darwin" => :pkgdmg, "RedHat" => :up2date, "Fedora" => :yum, "FreeBSD" => :ports, "OpenBSD" => :openbsd, "Solaris" => :sun}[os]
  end

  it "should have a default provider" do
    Puppet::Type.type(:package).defaultprovider.should_not be_nil
  end

  it "should choose the correct provider each platform" do
    unless default_provider = provider_name(Facter.value(:operatingsystem))
      pending("No default provider specified in this test for #{Facter.value(:operatingsystem)}")
    end
    Puppet::Type.type(:package).defaultprovider.name.should == default_provider
  end
end

Version data entries

35 entries across 35 versions & 3 rubygems

Version Path
puppet-2.7.26 spec/integration/type/package_spec.rb
puppet-2.7.25 spec/integration/type/package_spec.rb
puppet-2.7.24 spec/integration/type/package_spec.rb
puppet-2.7.23 spec/integration/type/package_spec.rb
puppet-2.7.22 spec/integration/type/package_spec.rb
puppet-2.7.21 spec/integration/type/package_spec.rb
puppet-2.7.20 spec/integration/type/package_spec.rb
puppet-2.7.20.rc1 spec/integration/type/package_spec.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/spec/integration/type/package_spec.rb
puppet-2.7.19 spec/integration/type/package_spec.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/spec/integration/type/package_spec.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/spec/integration/type/package_spec.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/spec/integration/type/package_spec.rb
puppet-2.7.18 spec/integration/type/package_spec.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/spec/integration/type/package_spec.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/spec/integration/type/package_spec.rb
puppet-2.7.17 spec/integration/type/package_spec.rb
puppet-2.7.16 spec/integration/type/package_spec.rb
puppet-2.7.14 spec/integration/type/package_spec.rb
puppet-2.7.13 spec/integration/type/package_spec.rb