context 'defaults on deb' do
let(:facts) do
{
+ :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
:lsbdistid => 'Debian',
:osfamily => 'Debian',
:lsbdistcodename => 'wheezy',
context 'defaults on squeeze' do
let(:facts) do
{
+ :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '6', :full => '6.0' }},
:lsbdistid => 'Debian',
:osfamily => 'Debian',
:lsbdistcodename => 'squeeze',
context 'defaults on ubuntu' do
let(:facts) do
{
+ :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
:lsbdistid => 'Ubuntu',
:osfamily => 'Debian',
:lsbdistcodename => 'trusty',
context 'set everything' do
let(:facts) do
{
+ :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
:lsbdistid => 'Ubuntu',
:osfamily => 'Debian',
:lsbdistcodename => 'trusty',
context 'set things with hashes' do
let(:facts) do
{
+ :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
:lsbdistid => 'Ubuntu',
:osfamily => 'Debian',
:lsbdistcodename => 'trusty',
describe 'mint tests' do
let(:facts) do
{
+ :os => { :family => 'Debian', :name => 'Linuxmint', :release => { :major => '17', :full => '17' }},
:lsbdistid => 'linuxmint',
:osfamily => 'Debian',
:lsbdistcodename => 'qiana',
describe 'validation' do
let(:facts) do
{
+ :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
:lsbdistid => 'Ubuntu',
:osfamily => 'Debian',
:lsbdistcodename => 'trusty',
it do
expect {
subject.call
- }.to raise_error(Puppet::Error, /is not a string/)
+ }.to raise_error(Puppet::Error, /expects a/)
end
end
context 'invalid release' do
it do
expect {
subject.call
- }.to raise_error(Puppet::Error, /is not a string/)
+ }.to raise_error(Puppet::Error, /expects a/)
end
end
context 'invalid repos' do
it do
expect {
subject.call
- }.to raise_error(Puppet::Error, /is not a string/)
+ }.to raise_error(Puppet::Error, /expects a/)
end
end
context 'invalid key' do
it do
expect {
subject.call
- }.to raise_error(Puppet::Error, /is not a string/)
+ }.to raise_error(Puppet::Error, /expects a/)
end
end
context 'invalid pin' do
it do
expect {
subject.call
- }.to raise_error(Puppet::Error, /pin must be either a string, number or hash/)
+ }.to raise_error(Puppet::Error, /expects a/)
end
end
end