Skip to content

Instantly share code, notes, and snippets.

@salgo
Created March 16, 2015 22:24
Show Gist options
  • Save salgo/6cd6ab3a630a610e2766 to your computer and use it in GitHub Desktop.
Save salgo/6cd6ab3a630a610e2766 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe package('httpd'), :if => os[:family] == 'redhat' do
it { should be_installed }
end
describe package('apache2'), :if => os[:family] == 'ubuntu' do
it { should be_installed }
end
describe service('httpd'), :if => os[:family] == 'redhat' do
it { should be_enabled }
it { should be_running }
end
describe service('apache2'), :if => os[:family] == 'ubuntu' do
it { should be_enabled }
it { should be_running }
end
describe service('org.apache.httpd'), :if => os[:family] == 'darwin' do
it { should be_enabled }
it { should be_running }
end
describe port(80) do
it { should be_listening }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment