forked from voxpupuli/puppet-cron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06f109f
commit 30024ee
Showing
1 changed file
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,80 @@ | ||
require 'spec_helper' | ||
|
||
describe 'cron::install' do | ||
it do | ||
should contain_package( 'cron' ).with( 'ensure' => 'installed' ) | ||
context 'default' do | ||
it do | ||
should contain_package( 'cron' ).with( 'ensure' => 'installed', 'name' => 'cron' ) | ||
end | ||
end | ||
|
||
context 'CentOS 5' do | ||
let :facts do | ||
{ | ||
:osfamily => 'RedHat', | ||
:operatingsystem => 'CentOS', | ||
:operatingsystemmajrelease => '5', | ||
} | ||
end | ||
it { should contain_class( 'cron::install' ) } | ||
it { should contain_package( 'cron' ).with( | ||
'name' => 'vixie-cron' | ||
) | ||
} | ||
end | ||
|
||
context 'CentOS 6' do | ||
let :facts do | ||
{ | ||
:osfamily => 'RedHat', | ||
:operatingsystem => 'CentOS', | ||
:operatingsystemmajrelease => '6', | ||
} | ||
end | ||
it { should contain_class( 'cron::install' ) } | ||
it { should contain_package( 'cron' ).with( | ||
'name' => 'cronie' | ||
) | ||
} | ||
end | ||
|
||
context 'Gentoo' do | ||
let :facts do | ||
{ | ||
:operatingsystem => 'Gentoo', | ||
} | ||
end | ||
it { should contain_class( 'cron::install' ) } | ||
it { should contain_package( 'cron' ).with( | ||
'name' => 'sys-process/vixie-cron' | ||
) | ||
} | ||
end | ||
|
||
context 'Ubuntu' do | ||
let :facts do | ||
{ | ||
:operatingsystem => 'Ubuntu', | ||
} | ||
end | ||
it { should contain_class( 'cron::install' ) } | ||
it { should contain_package( 'cron' ).with( | ||
'name' => 'cron' | ||
) | ||
} | ||
end | ||
|
||
context 'Debian' do | ||
let :facts do | ||
{ | ||
:operatingsystem => 'Debian', | ||
} | ||
end | ||
it { should contain_class( 'cron::install' ) } | ||
it { should contain_package( 'cron' ).with( | ||
'name' => 'cron' | ||
) | ||
} | ||
end | ||
|
||
end | ||
|