Skip to content

Instantly share code, notes, and snippets.

@salgo
Created March 16, 2015 22:24
Show Gist options
  • Select an option

  • Save salgo/6cd6ab3a630a610e2766 to your computer and use it in GitHub Desktop.

Select an option

Save salgo/6cd6ab3a630a610e2766 to your computer and use it in GitHub Desktop.

Revisions

  1. salgo created this gist Mar 16, 2015.
    28 changes: 28 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    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