-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathapache_spec.rb
46 lines (45 loc) · 1.17 KB
/
apache_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
require 'spec_helper'
describe 'apache', :type => :class do
context "On a Debian OS" do
let :facts do
{ :osfamily => 'Debian' }
end
it { should include_class("apache::params") }
it { should contain_package("httpd") }
it { should contain_service("httpd").with(
'ensure' => 'running',
'enable' => 'true',
'subscribe' => 'Package[httpd]'
)
}
it { should contain_file("httpd_vdir").with(
'ensure' => 'directory',
'recurse' => 'true',
'purge' => 'true',
'notify' => 'Service[httpd]',
'require' => 'Package[httpd]'
)
}
end
context "On a RedHat OS" do
let :facts do
{ :osfamily => 'RedHat' }
end
it { should include_class("apache::params") }
it { should contain_package("httpd") }
it { should contain_service("httpd").with(
'ensure' => 'running',
'enable' => 'true',
'subscribe' => 'Package[httpd]'
)
}
it { should contain_file("httpd_vdir").with(
'ensure' => 'directory',
'recurse' => 'true',
'purge' => 'true',
'notify' => 'Service[httpd]',
'require' => 'Package[httpd]'
)
}
end
end