Skip to content

Commit

Permalink
fix up tests for rspec-puppet 1
Browse files Browse the repository at this point in the history
  • Loading branch information
garethr committed Dec 24, 2013
1 parent 343f4cc commit 6adfca8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 4 additions & 2 deletions spec/classes/riemann/dash_spec.rb
Expand Up @@ -3,10 +3,12 @@
describe 'riemann::dash', :type => :class do
let(:facts) { {:osfamily => 'Debian', :lsbdistcodename => 'precise'} }

it { should compile.with_all_deps }

it { should create_class('riemann::dash::install')}
it { should create_class('riemann::dash::config')}
it { should create_class('riemann::dash::service')}
it { should include_class('gcc')}
it { should contain_class('gcc')}
it { should contain_package('riemann-dash')}
it { should contain_package('libxml2-dev')}
it { should contain_package('libxslt-dev')}
Expand Down Expand Up @@ -53,7 +55,7 @@

context 'when running on RedHat/Centos' do
let(:facts) { {:osfamily => 'RedHat', :operatingsystem => 'Centos'} }
it { should include_class('epel') }
it { should contain_class('epel') }
it { should contain_package('libxml2-devel')}
it { should contain_package('libxslt-devel')}
it { should contain_file('/etc/init.d/riemann-dash').with_mode('0755').with_content(/\/usr\/bin\/riemann-dash/)}
Expand Down
10 changes: 5 additions & 5 deletions spec/classes/riemann/riemann_spec.rb
Expand Up @@ -3,12 +3,12 @@
describe 'riemann', :type => :class do
let(:facts) { {:osfamily => 'Debian', :lsbdistcodename => 'precise'} }

it { should include_class('riemann::install') }
it { should include_class('riemann::config') }
it { should include_class('riemann::service') }
it { should contain_class('riemann::install') }
it { should contain_class('riemann::config') }
it { should contain_class('riemann::service') }
it { should contain_class('wget')}
it { should contain_class('java')}
it { should_not include_class('epel') }
it { should_not contain_class('epel') }
it { should contain_file('/etc/riemann.sample.config') }
it { should contain_file('/etc/puppet/riemann.yaml') }
it { should contain_service('riemann').with_provider('upstart')}
Expand Down Expand Up @@ -69,7 +69,7 @@

context 'when running on RedHat/Centos' do
let(:facts) { {:osfamily => 'RedHat', :operatingsystem => 'Centos'} }
it { should include_class('epel') }
it { should contain_class('epel') }
it { should contain_package('daemonize')}
it { should contain_file('/etc/init.d/riemann').with_mode('0755')}
it { should_not contain_file('/etc/init/riemann.conf')}
Expand Down
6 changes: 4 additions & 2 deletions spec/classes/riemann/tools_spec.rb
Expand Up @@ -3,11 +3,13 @@
describe 'riemann::tools', :type => :class do
let(:facts) { {:osfamily => 'Debian', :lsbdistcodename => 'precise'} }

it { should compile.with_all_deps }

it { should contain_package('riemann-tools').with_provider('gem')}
it { should contain_package('riemann-client').with_provider('gem')}
it { should contain_package('libxml2-dev')}
it { should contain_package('libxslt-dev')}
it { should include_class('gcc')}
it { should contain_class('gcc')}

context 'with services disabled' do
let(:params) { {'health_enabled' => false, 'net_enabled' => false} }
Expand Down Expand Up @@ -54,7 +56,7 @@

context 'when running on RedHat/Centos' do
let(:facts) { {:osfamily => 'RedHat', :operatingsystem => 'Centos'} }
it { should include_class('epel') }
it { should contain_class('epel') }
it { should contain_file('/etc/init.d/riemann-net').with_mode('0755').with_content(/\/usr\/bin\/riemann-net/)}
it { should contain_file('/etc/init.d/riemann-health').with_mode('0755').with_content(/\/usr\/bin\/riemann-health/)}
it { should_not contain_file('/etc/init/riemann-net.conf')}
Expand Down

0 comments on commit 6adfca8

Please sign in to comment.