Hi,
I tried to use verify_contents function to test content of config file in rspec-puppet
it { should contain_file('/etc/resolv.conf').with(
'ensure' => 'present',
'mode' => '0640',
'group' => 'root',
'owner' => 'root',
verify_contents(catalog, '/etc/resolv.conf',[
'search server.com'
])
)}
but I got below error
`block (2 levels) in ': undefined local variable or method `catalog' for # (NameError)
from /opt/puppet/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:246:in `module_eval'
is this any rspec version issue.
↧