|
11 | 11 | context 'passing no parameters' do |
12 | 12 | it { is_expected.to contain_class('apache::params') } |
13 | 13 | it { is_expected.to contain_apache__mod('dir') } |
14 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{^DirectoryIndex }) } |
15 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.html }) } |
16 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.html\.var }) } |
17 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.cgi }) } |
18 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.pl }) } |
19 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.php }) } |
20 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.xhtml$}) } |
| 14 | + it do |
| 15 | + is_expected.to contain_file('dir.conf') |
| 16 | + .with_content(%r{^DirectoryIndex }) |
| 17 | + .with_content(%r{ index\.html }) |
| 18 | + .with_content(%r{ index\.html\.var }) |
| 19 | + .with_content(%r{ index\.cgi }) |
| 20 | + .with_content(%r{ index\.pl }) |
| 21 | + .with_content(%r{ index\.php }) |
| 22 | + .with_content(%r{ index\.xhtml$}) |
| 23 | + end |
21 | 24 | end |
22 | 25 | context "passing indexes => ['example.txt','fearsome.aspx']" do |
23 | 26 | let :params do |
24 | 27 | { indexes: ['example.txt', 'fearsome.aspx'] } |
25 | 28 | end |
26 | 29 |
|
27 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ example\.txt }) } |
28 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ fearsome\.aspx$}) } |
| 30 | + it { is_expected.to contain_file('dir.conf').with_content(%r{ example\.txt }).with_content(%r{ fearsome\.aspx$}) } |
29 | 31 | end |
30 | 32 | end |
31 | 33 | context 'default configuration with parameters on a RedHat OS' do |
|
34 | 36 | context 'passing no parameters' do |
35 | 37 | it { is_expected.to contain_class('apache::params') } |
36 | 38 | it { is_expected.to contain_apache__mod('dir') } |
37 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{^DirectoryIndex }) } |
38 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.html }) } |
39 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.html\.var }) } |
40 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.cgi }) } |
41 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.pl }) } |
42 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.php }) } |
43 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.xhtml$}) } |
| 39 | + it do |
| 40 | + is_expected.to contain_file('dir.conf') |
| 41 | + .with_content(%r{^DirectoryIndex }) |
| 42 | + .with_content(%r{ index\.html }) |
| 43 | + .with_content(%r{ index\.html\.var }) |
| 44 | + .with_content(%r{ index\.cgi }) |
| 45 | + .with_content(%r{ index\.pl }) |
| 46 | + .with_content(%r{ index\.php }) |
| 47 | + .with_content(%r{ index\.xhtml$}) |
| 48 | + end |
44 | 49 | end |
45 | 50 | context "passing indexes => ['example.txt','fearsome.aspx']" do |
46 | 51 | let :params do |
47 | 52 | { indexes: ['example.txt', 'fearsome.aspx'] } |
48 | 53 | end |
49 | 54 |
|
50 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ example\.txt }) } |
51 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ fearsome\.aspx$}) } |
| 55 | + it { is_expected.to contain_file('dir.conf').with_content(%r{ example\.txt }).with_content(%r{ fearsome\.aspx$}) } |
52 | 56 | end |
53 | 57 | end |
54 | 58 | context 'default configuration with parameters on a FreeBSD OS' do |
|
57 | 61 | context 'passing no parameters' do |
58 | 62 | it { is_expected.to contain_class('apache::params') } |
59 | 63 | it { is_expected.to contain_apache__mod('dir') } |
60 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{^DirectoryIndex }) } |
61 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.html }) } |
62 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.html\.var }) } |
63 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.cgi }) } |
64 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.pl }) } |
65 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.php }) } |
66 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.xhtml$}) } |
| 64 | + it do |
| 65 | + is_expected.to contain_file('dir.conf') |
| 66 | + .with_content(%r{^DirectoryIndex }) |
| 67 | + .with_content(%r{ index\.html }) |
| 68 | + .with_content(%r{ index\.html\.var }) |
| 69 | + .with_content(%r{ index\.cgi }) |
| 70 | + .with_content(%r{ index\.pl }) |
| 71 | + .with_content(%r{ index\.php }) |
| 72 | + .with_content(%r{ index\.xhtml$}) |
| 73 | + end |
67 | 74 | end |
68 | 75 | context "passing indexes => ['example.txt','fearsome.aspx']" do |
69 | 76 | let :params do |
70 | 77 | { indexes: ['example.txt', 'fearsome.aspx'] } |
71 | 78 | end |
72 | 79 |
|
73 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ example\.txt }) } |
74 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ fearsome\.aspx$}) } |
| 80 | + it { is_expected.to contain_file('dir.conf').with_content(%r{ example\.txt }).with_content(%r{ fearsome\.aspx$}) } |
75 | 81 | end |
76 | 82 | end |
77 | 83 | context 'default configuration with parameters on a Gentoo OS' do |
|
80 | 86 | context 'passing no parameters' do |
81 | 87 | it { is_expected.to contain_class('apache::params') } |
82 | 88 | it { is_expected.to contain_apache__mod('dir') } |
83 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{^DirectoryIndex }) } |
84 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.html }) } |
85 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.html\.var }) } |
86 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.cgi }) } |
87 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.pl }) } |
88 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.php }) } |
89 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ index\.xhtml$}) } |
| 89 | + it do |
| 90 | + is_expected.to contain_file('dir.conf') |
| 91 | + .with_content(%r{^DirectoryIndex }) |
| 92 | + .with_content(%r{ index\.html }) |
| 93 | + .with_content(%r{ index\.html\.var }) |
| 94 | + .with_content(%r{ index\.cgi }) |
| 95 | + .with_content(%r{ index\.pl }) |
| 96 | + .with_content(%r{ index\.php }) |
| 97 | + .with_content(%r{ index\.xhtml$}) |
| 98 | + end |
90 | 99 | end |
91 | 100 | context "passing indexes => ['example.txt','fearsome.aspx']" do |
92 | 101 | let :params do |
93 | 102 | { indexes: ['example.txt', 'fearsome.aspx'] } |
94 | 103 | end |
95 | 104 |
|
96 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ example\.txt }) } |
97 | | - it { is_expected.to contain_file('dir.conf').with_content(%r{ fearsome\.aspx$}) } |
| 105 | + it { is_expected.to contain_file('dir.conf').with_content(%r{ example\.txt }).with_content(%r{ fearsome\.aspx$}) } |
98 | 106 | end |
99 | 107 | end |
100 | 108 | end |
0 commit comments