Skip to content

Commit

Permalink
make #verify_contents usage compatible with rspec-puppet > 1.0.1
Browse files Browse the repository at this point in the history
The verify_contents method invocations have been updated to work with
rspec-puppet 1.0.1+ but are now incompatible with <= 1.0.1
rodjek/rspec-puppet#235
  • Loading branch information
jhoblitt committed Nov 18, 2014
1 parent d5daf1e commit e80c3aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ gem 'rake', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', :require => false
gem 'puppet-syntax', :require => false
# The verify_contents method invocations have been updated to work with
# rspec-puppet 1.0.1+ but are now incompatible with <= 1.0.1
# https://github.com/rodjek/rspec-puppet/issues/235
gem 'rspec-puppet',
:git => 'https://github.com/rodjek/rspec-puppet.git',
:ref => '6ac97993fa972a15851a73d55fe3d1c0a85172b5',
Expand Down
14 changes: 7 additions & 7 deletions spec/unit/classes/smartd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
})
end
it "should contain File[#{config_file}] with correct contents" do
verify_contents(subject, config_file, content)
verify_contents(catalogue, config_file, content)
end
end

Expand Down Expand Up @@ -229,7 +229,7 @@

it { should contain_file('/etc/smartd.conf').with_ensure('present') }
it 'should contain file /etc/smartd.conf with contents ...' do
verify_contents(subject, '/etc/smartd.conf', [
verify_contents(catalogue, '/etc/smartd.conf', [
'DEFAULT -m root -M daily',
'DEVICESCAN somevalue',
])
Expand All @@ -248,7 +248,7 @@

it { should contain_file('/etc/smartd.conf').with_ensure('present') }
it 'should contain file /etc/smartd.conf with contents ...' do
verify_contents(subject, '/etc/smartd.conf', [
verify_contents(catalogue, '/etc/smartd.conf', [
'DEFAULT -m root -M daily',
'/dev/sg1',
'/dev/sg2',
Expand All @@ -268,7 +268,7 @@

it { should contain_file('/etc/smartd.conf').with_ensure('present') }
it 'should contain file /etc/smartd.conf with contents ...' do
verify_contents(subject, '/etc/smartd.conf', [
verify_contents(catalogue, '/etc/smartd.conf', [
'DEFAULT -m root -M daily',
'/dev/sg1 -o on -S on -a',
'/dev/sg2 -o on -S on -a',
Expand All @@ -293,7 +293,7 @@

it { should contain_file('/etc/smartd.conf').with_ensure('present') }
it 'should contain file /etc/smartd.conf with contents ...' do
verify_contents(subject, '/etc/smartd.conf', [
verify_contents(catalogue, '/etc/smartd.conf', [
'DEFAULT -m root -M daily',
'/dev/cciss/c0d0 -d cciss,0 -a -o on -S on',
'/dev/cciss/c0d0 -d cciss,1 -a -o on -S on',
Expand All @@ -310,7 +310,7 @@

it { should contain_file('/etc/smartd.conf').with_ensure('present') }
it 'should contain file /etc/smartd.conf with contents ...' do
verify_contents(subject, '/etc/smartd.conf', [
verify_contents(catalogue, '/etc/smartd.conf', [
'DEFAULT -m someguy@localdomain -M daily',
])
end
Expand All @@ -321,7 +321,7 @@

it { should contain_file('/etc/smartd.conf').with_ensure('present') }
it 'should contain file /etc/smartd.conf with contents ...' do
verify_contents(subject, '/etc/smartd.conf', [
verify_contents(catalogue, '/etc/smartd.conf', [
'DEFAULT -m root -M diminishing',
])
end
Expand Down

0 comments on commit e80c3aa

Please sign in to comment.