Skip to content

Commit

Permalink
resolve rspec-puppet > 1 deprecation warnings
Browse files Browse the repository at this point in the history
    DEPRECATION: include_class is deprecated. Use contain_class instead.
  • Loading branch information
Joshua Hoblitt committed Dec 11, 2013
1 parent e878d16 commit 6c8d64f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion spec/classes/gmetad_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

let(:params) { {:clusters => clusters} }
it do
should include_class('ganglia::gmetad')
should contain_class('ganglia::gmetad')
should contain_file('/etc/ganglia/gmetad.conf')
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/gmond_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

let(:params) { params }
it do
should include_class('ganglia::gmond')
should contain_class('ganglia::gmond')
should contain_file('/etc/ganglia/gmond.conf')
end
end
Expand Down
10 changes: 5 additions & 5 deletions spec/classes/params_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@
describe 'el5.x' do
before { facts[:operatingsystemmajrelease] = '5' }

it { should include_class('ganglia::params') }
it { should contain_class('ganglia::params') }
end

describe 'el6.x' do
before { facts[:operatingsystemmajrelease] = '6' }

it { should include_class('ganglia::params') }
it { should contain_class('ganglia::params') }
end

describe 'el7.x+/fedora' do
before { facts[:operatingsystemmajrelease] = '7' }

it { should include_class('ganglia::params') }
it { should contain_class('ganglia::params') }
end

describe 'el4.x' do
before { facts[:operatingsystemmajrelease] = '4' }

it 'should fail' do
expect { should include_class('ganglia::params') }.
expect { should contain_class('ganglia::params') }.
to raise_error(Puppet::Error, /not supported on operatingsystemmajrelease/)
end
end
Expand All @@ -42,7 +42,7 @@
end

it 'should fail' do
expect { should include_class('ganglia::params') }.
expect { should contain_class('ganglia::params') }.
to raise_error(Puppet::Error, /not supported on Debian/)
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/web_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
context 'with out params' do
let(:params) { { } }
it do
should include_class('ganglia::web')
should contain_class('ganglia::web')
should contain_file('/etc/ganglia/conf.php')
end
end
Expand Down

0 comments on commit 6c8d64f

Please sign in to comment.