diff options
author | Steffen Zieger <me@saz.sh> | 2012-11-19 04:45:26 -0800 |
---|---|---|
committer | Steffen Zieger <me@saz.sh> | 2012-11-19 04:45:26 -0800 |
commit | 55d2f576e6f17719859f6230790ba7453c550a4e (patch) | |
tree | 1cd26f3247ca0505dc8a3f5c4d9eea24b560d202 /spec/classes/rsyslog_install_spec.rb | |
parent | e34a766c2d294a09af091935039058f160293c9c (diff) | |
parent | f14ab8a15c76c72c2a8cb92cdd8d79bae613e6ca (diff) |
Merge pull request #13 from newrelic/update-rake-lint
Create spec tests and puppet-lint cleanup
Diffstat (limited to 'spec/classes/rsyslog_install_spec.rb')
-rw-r--r-- | spec/classes/rsyslog_install_spec.rb | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/spec/classes/rsyslog_install_spec.rb b/spec/classes/rsyslog_install_spec.rb new file mode 100644 index 0000000..a1baea3 --- /dev/null +++ b/spec/classes/rsyslog_install_spec.rb @@ -0,0 +1,54 @@ +require 'spec_helper' + +describe 'rsyslog::install', :type => :class do + context "osfamily = RedHat" do + let :facts do + { + :osfamily => 'RedHat', + } + end + + context "default usage (osfamily = RedHat)" do + let(:title) { 'rsyslog-install-basic' } + + it 'should compile' do + should contain_package('rsyslog') + should contain_package('rsyslog-relp') + end + end + end + + context "osfamily = Debian" do + let :facts do + { + :osfamily => 'Debian', + } + end + + context "default usage (osfamily = Debian)" do + let(:title) { 'rsyslog-install-basic' } + + it 'should compile' do + should contain_package('rsyslog') + should contain_package('rsyslog-relp') + end + end + end + + context "osfamily = FreeBSD" do + let :facts do + { + :osfamily => 'freebsd', + } + end + + context "default usage (osfamily = Debian)" do + let(:title) { 'rsyslog-install-basic' } + + it 'should compile' do + should contain_package('sysutils/rsyslog5') + should contain_package('sysutils/rsyslog5-relp') + end + end + end +end |