- Timestamp:
- Jul 31, 2017, 6:42:27 PM (9 years ago)
- Branches:
- 0.5, app-cordova, debian/bullseye, debian/jessie, master
- Children:
- fc9d514
- Parents:
- eb1ccd6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/puppetcode/environments/gnuboat/modules/apt/spec/defines/pin_spec.rb
reb1ccd6 rbe0859f 4 4 'class { "apt": }' 5 5 end 6 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } 6 let(:facts) { { 7 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 8 :lsbdistid => 'Debian', 9 :osfamily => 'Debian', 10 :lsbdistcodename => 'wheezy', 11 :puppetversion => Puppet.version, 12 } } 7 13 let(:title) { 'my_pin' } 8 14 9 15 context 'defaults' do 10 16 it { is_expected.to contain_apt__setting("pref-my_pin").with_content(/Explanation: : my_pin\nPackage: \*\nPin: release a=my_pin\nPin-Priority: 0\n/)} 11 it { is_expected.to contain_apt__setting("pref-my_pin") }12 17 end 13 18 … … 16 21 { 17 22 'packages' => 'vim', 18 'version' => '1',23 'version' => "1", 19 24 } 20 25 end 21 26 it { is_expected.to contain_apt__setting("pref-my_pin").with_content(/Explanation: : my_pin\nPackage: vim\nPin: version 1\nPin-Priority: 0\n/)} 22 it { is_expected.to contain_apt__setting("pref-my_pin") }23 27 end 24 28 … … 31 35 end 32 36 it { is_expected.to contain_apt__setting("pref-my_pin").with_content(/Explanation: : my_pin\nPackage: vim\nPin: origin test\nPin-Priority: 0\n/)} 33 it { is_expected.to contain_apt__setting("pref-my_pin") }34 37 end 35 38 … … 82 85 expect { 83 86 subject.call 84 }.to raise_error(Puppet::Error, / Only integers are allowed/)87 }.to raise_error(Puppet::Error, /expects an Integer value, got String/) 85 88 end 86 89 end
Note:
See TracChangeset
for help on using the changeset viewer.
