Sha256: 1d403d06c5a921b14abca5930be179823d912488365bbb492bb9b65e7d5f85e6
Contents?: true
Size: 1.16 KB
Versions: 30
Compression:
Stored size: 1.16 KB
Contents
#! /usr/bin/env ruby require 'spec_helper' describe "Package provider" do include PuppetSpec::Files 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 options = {:name => "nosuch#{provider.name}", :provider => provider.name} pkg = Puppet::Type.newpackage(options) expect { pkg.provider.install }.to raise_error { |error| expect(error).not_to eq("") } end it "should be able to get a list of existing packages" do # the instances method requires root priviledges on gentoo # if the eix cache is outdated (to run eix-update) so make # sure we dont actually run eix-update if provider.name == :portage provider.stubs(:update_eix).returns('Database contains 15240 packages in 155 categories') end provider.instances.each do |package| expect(package).to be_instance_of(provider) expect(package.properties[:provider]).to eq(provider.name) end end end end end
Version data entries
30 entries across 30 versions & 1 rubygems