2 describe 'apt::pin', :type => :define do
3 let(:title) { 'my_pin' }
17 :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: release a=my_pin\nPin-Priority: 0\n"
21 :packages => 'apache',
24 :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n"
29 :packages => 'apache',
32 :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n"
37 :packages => 'apache',
40 :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n"
44 :packages => 'apache',
46 :release => 'my_newpin'
48 :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_newpin\nPin-Priority: 1\n"
52 :packages => 'apache',
56 :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: version 2.2.16*\nPin-Priority: 1\n"
61 :origin => 'ftp.de.debian.org'
63 :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: origin \"ftp.de.debian.org\"\nPin-Priority: 1\n"
67 :packages => 'apache',
70 :codename => 'wheezy',
71 :release_version => '3.0',
73 :originator => 'Debian',
76 :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"
79 describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do
81 default_params.merge(param_set[:params])
88 it { should contain_class("apt::params") }
90 it { should contain_file("#{title}.pref").with({
91 'ensure' => param_hash[:ensure],
92 'path' => "/etc/apt/preferences.d/#{param_hash[:order] == '' ? "" : "#{param_hash[:order]}-"}#{title}.pref",
96 'content' => param_set[:content],