Apache2 + Passenger: describe command('apachectl -M') do its(:stdout) { should contain('mod_passenger') } end # nginx + Passenger: describe command('nginx -V') do its(:stdout) { should contain('--with-passenger') } end
Passenger: shared_examples 'apache2::passenger' do describe command('apachectl -M') do its(:stdout) { should contain('mod_passenger') } end end # nginx + Passenger: shared_examples 'nginx::passenger' do describe command('nginx -V') do its(:stdout) { should contain('--with-passenger') } end describe package('passenger') do it { should be_installed } end end
describe package('apache2') do it { should be_installed } end end describe 'myotherserver.com' do include_examples 'nginx::passenger' describe package('nginx-extras') do it { should be_installed } end end