X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fpin_spec.rb;h=179a2f3ac5bcf48e7bfc80b67c54334f76da093b;hb=ef7d149d5a6b014b53b12925bb5d6638192ac08d;hp=a4cb1e26e3ad74f0ef67a58b52af2f9119278aa9;hpb=c00888f6d05d4930c91f7d2a7e0446ac9fdb05ac;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/pin_spec.rb b/spec/defines/pin_spec.rb index a4cb1e2..179a2f3 100644 --- a/spec/defines/pin_spec.rb +++ b/spec/defines/pin_spec.rb @@ -65,7 +65,7 @@ describe 'apt::pin', :type => :define do { :params => { :packages => 'apache', - :priority => '1', + :priority => '1', :release => 'stable', :codename => 'wheezy', :release_version => '3.0', @@ -75,6 +75,12 @@ describe 'apt::pin', :type => :define do }, :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=stable, n=wheezy, v=3.0, c=main, o=Debian, l=Debian\nPin-Priority: 1\n" }, + { + :params => { + :packages => ['apache', 'ntop'], + }, + :content => "# my_pin\nExplanation: : my_pin\nPackage: apache ntop\nPin: release a=my_pin\nPin-Priority: 0\n" + }, ].each do |param_set| describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do let :param_hash do @@ -85,7 +91,7 @@ describe 'apt::pin', :type => :define do param_set[:params] end - it { should include_class("apt::params") } + it { should contain_class("apt::params") } it { should contain_file("#{title}.pref").with({ 'ensure' => param_hash[:ensure],