Update update.pp
[puppet-modules/puppetlabs-apt.git] / spec / classes / params_spec.rb
1 require 'spec_helper'
2 describe 'apt::params', :type => :class do
3   let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } }
4
5   # There are 4 resources in this class currently
6   # there should not be any more resources because it is a params class
7   # The resources are class[apt::params], class[main], class[settings], stage[main]
8   it "Should not contain any resources" do
9     expect(subject.call.resources.size).to eq(4)
10   end
11
12   describe "With lsb-release not installed" do
13     let(:facts) { { :osfamily => 'Debian', :puppetversion => Puppet.version, } }
14     let (:title) { 'my_package' }
15
16     it do
17       expect {
18         subject.call
19       }.to raise_error(Puppet::Error, /Unable to determine lsbdistid, please install lsb-release first/)
20     end
21   end
22 end