I'm hoping somebody with more rspec experience than me can shed some light on what I need to do to get this to work.
Puppet::Error: Could not parse for environment production: No file(s) found for import of '/etc/puppet/manifests/site.pp' at line 4 on node test-node
#### Works
describe 'puppet apply' do
context 'with role webserver' do
manifest = "class { 'profiles::webserver': }"
it 'should work idempotently with no errors' do
apply_manifest(manifest, :catch_failures => true)
apply_manifest(manifest, :catch_changes => true)
end
describe service('nginx') do
it { should be_enabled }
it { should be_running }
end
end
end
#### Doesn't Work
shared_examples 'profiles::nginx' do
describe service('puppet') do
it { should be_enabled }
it { should be_running }
end
end
describe 'puppet apply' do
context 'with role webserver' do
manifest = "class { 'profiles::webserver': }"
it 'should work idempotently with no errors' do
apply_manifest(manifest, :catch_failures => true)
apply_manifest(manifest, :catch_changes => true)
end
include_examples 'profiles::nginx'
end
end
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--