Sha256: 0ccd1185e368b47dc0ddcf8f09cfc80d85293d1c2524f87f4d1159a4e202831a

Contents?: true

Size: 870 Bytes

Versions: 2

Compression:

Stored size: 870 Bytes

Contents

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

describe "Package Provider", :'fails_on_ruby_1.9.2' => true do
  Puppet::Type.type(:package).providers.each do |name|
    provider = Puppet::Type.type(:package).provider(name)

    describe name, :if => provider.suitable? do
      it "should fail when asked to install an invalid package" do
        pending("This test hangs forever with recent versions of RubyGems") if provider.name == :gem
        pkg = Puppet::Type.newpackage :name => "nosuch#{provider.name}", :provider => provider.name
        lambda { pkg.provider.install }.should raise_error
      end

      it "should be able to get a list of existing packages" do
        provider.instances.each do |package|
          package.should be_instance_of(provider)
          package.properties[:provider].should == provider.name
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puppet-2.7.3 spec/integration/provider/package_spec.rb
puppet-2.7.1 spec/integration/provider/package_spec.rb