Sha256: 145f7a16d23f4d255bee745d0f225a792b7029d25e043d9f8bf68b27600ab134

Contents?: true

Size: 667 Bytes

Versions: 269

Compression:

Stored size: 667 Bytes

Contents

require 'spec_helper'
require 'puppet/provider/package'

describe Puppet::Provider::Package do
  it 'returns absent for uninstalled packages when not purgeable' do
    provider = Puppet::Provider::Package.new
    provider.expects(:query).returns nil
    provider.class.expects(:feature?).with(:purgeable).returns false
    expect(provider.properties[:ensure]).to eq(:absent)
  end

  it 'returns purged for uninstalled packages when purgeable' do
    provider = Puppet::Provider::Package.new
    provider.expects(:query).returns nil
    provider.class.expects(:feature?).with(:purgeable).returns true
    expect(provider.properties[:ensure]).to eq(:purged)
  end
end

Version data entries

269 entries across 269 versions & 1 rubygems

Version Path
puppet-6.4.0 spec/unit/provider/package/base_spec.rb
puppet-6.4.0-x86-mingw32 spec/unit/provider/package/base_spec.rb
puppet-6.4.0-x64-mingw32 spec/unit/provider/package/base_spec.rb
puppet-6.4.0-universal-darwin spec/unit/provider/package/base_spec.rb
puppet-6.0.7 spec/unit/provider/package/base_spec.rb
puppet-6.0.7-x86-mingw32 spec/unit/provider/package/base_spec.rb
puppet-6.0.7-x64-mingw32 spec/unit/provider/package/base_spec.rb
puppet-6.0.7-universal-darwin spec/unit/provider/package/base_spec.rb
puppet-5.5.12 spec/unit/provider/package/base_spec.rb
puppet-5.5.12-x86-mingw32 spec/unit/provider/package/base_spec.rb
puppet-5.5.12-x64-mingw32 spec/unit/provider/package/base_spec.rb
puppet-5.5.12-universal-darwin spec/unit/provider/package/base_spec.rb
puppet-6.3.0 spec/unit/provider/package/base_spec.rb
puppet-6.3.0-x86-mingw32 spec/unit/provider/package/base_spec.rb
puppet-6.3.0-x64-mingw32 spec/unit/provider/package/base_spec.rb
puppet-6.3.0-universal-darwin spec/unit/provider/package/base_spec.rb
puppet-6.2.0 spec/unit/provider/package/base_spec.rb
puppet-6.2.0-x86-mingw32 spec/unit/provider/package/base_spec.rb
puppet-6.2.0-x64-mingw32 spec/unit/provider/package/base_spec.rb
puppet-6.2.0-universal-darwin spec/unit/provider/package/base_spec.rb