Sha256: cbba680f4bc2b92584ff480a8409b2dccd877a574192201f5f4e7fd3d7d5114c

Contents?: true

Size: 897 Bytes

Versions: 1

Compression:

Stored size: 897 Bytes

Contents

require 'spec_helper'

include Serverspec::Helper::Debian

describe 'Serverspec commands of Debian family' do
  it_behaves_like 'support command check_running_under_supervisor', 'httpd'

  it_behaves_like 'support command check_running_under_upstart', 'monit'

  it_behaves_like 'support command check_monitored_by_monit', 'unicorn'

  it_behaves_like 'support command check_process', 'httpd'
end

describe 'check_enabled' do
  subject { commands.check_enabled('httpd') }
  it { should eq "ls /etc/rc3.d/ | grep -- httpd || grep 'start on' /etc/init/httpd.conf" }
end

describe 'check_enabled with run level 5' do
  subject { commands.check_enabled('httpd', 5) }
  it { should eq "ls /etc/rc5.d/ | grep -- httpd || grep 'start on' /etc/init/httpd.conf" }
end

describe 'check_running' do
  subject { commands.check_running('httpd') }
  it { should eq "service httpd status | grep 'running'" }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
serverspec-0.6.24 spec/debian/commands_spec.rb