Skip to content

Commit 7a2d51b

Browse files
committed
Spec tests for default_cache_enable behaviour.
1 parent 44e29bb commit 7a2d51b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

spec/classes/mod/disk_cache_spec.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
}'
5757
end
5858

59-
let(:params) {{ 'default_cache_enable' => false}}
59+
let(:params) { { 'default_cache_enable' => false} }
6060

6161
it { is_expected.to compile }
6262
it { is_expected.to contain_class('apache::mod::disk_cache') }
@@ -76,7 +76,7 @@
7676
}'
7777
end
7878

79-
let(:params) {{ 'default_cache_enable' => true}}
79+
let(:params) { { 'default_cache_enable' => true} }
8080

8181
it { is_expected.to compile }
8282
it { is_expected.to contain_class('apache::mod::disk_cache') }
@@ -96,7 +96,7 @@
9696
}'
9797
end
9898

99-
let(:params) {{ 'default_cache_enable' => 'foo'}}
99+
let(:params) { { 'default_cache_enable' => 'foo'} }
100100

101101
it { is_expected.to compile }
102102
it { is_expected.to contain_class('apache::mod::disk_cache') }
@@ -105,7 +105,7 @@
105105
it {
106106
is_expected.to contain_file('disk_cache.conf')
107107
.with(content: %r{CacheEnable disk \/\nCacheRoot \"\/var\/cache\/apache2\/mod_cache_disk\"\nCacheDirLevels 2\nCacheDirLength 1\nCacheIgnoreHeaders Set-Cookie})
108-
}.to raise_error(Puppet::Error, /default_cache_enable must be true or false/)
108+
}.to raise_error(Puppet::Error, %r/default_cache_enable must be true or false/)
109109
end
110110
end
111111

@@ -157,7 +157,7 @@
157157
}'
158158
end
159159

160-
let(:params) {{ 'default_cache_enable' => false}}
160+
let(:params) { { 'default_cache_enable' => false} }
161161

162162
it { is_expected.to compile }
163163
it { is_expected.to contain_class('apache::mod::disk_cache') }
@@ -177,7 +177,7 @@
177177
}'
178178
end
179179

180-
let(:params) {{ 'default_cache_enable' => true}}
180+
let(:params) { { 'default_cache_enable' => true} }
181181

182182
it { is_expected.to compile }
183183
it { is_expected.to contain_class('apache::mod::disk_cache') }
@@ -197,7 +197,7 @@
197197
}'
198198
end
199199

200-
let(:params) {{ 'default_cache_enable' => 'foo'}}
200+
let(:params) { { 'default_cache_enable' => 'foo'} }
201201

202202
it { is_expected.to compile }
203203
it { is_expected.to contain_class('apache::mod::disk_cache') }
@@ -206,7 +206,7 @@
206206
it {
207207
is_expected.to contain_file('disk_cache.conf')
208208
.with(content: %r{CacheEnable disk \/\nCacheRoot \"\/var\/cache\/apache2\/mod_cache_disk\"\nCacheDirLevels 2\nCacheDirLength 1\nCacheIgnoreHeaders Set-Cookie})
209-
}.to raise_error(Puppet::Error, /default_cache_enable must be true or false/)
209+
}.to raise_error(Puppet::Error, %r/default_cache_enable must be true or false/)
210210
end
211211
end
212212
context 'on a FreeBSD OS' do
@@ -263,7 +263,7 @@
263263
}'
264264
end
265265

266-
let(:params) {{ 'default_cache_enable' => false}}
266+
let(:params) { { 'default_cache_enable' => false} }
267267

268268
it { is_expected.to compile }
269269
it { is_expected.to contain_class('apache::mod::disk_cache') }
@@ -283,7 +283,7 @@
283283
}'
284284
end
285285

286-
let(:params) {{ 'default_cache_enable' => true}}
286+
let(:params) { { 'default_cache_enable' => true} }
287287

288288
it { is_expected.to compile }
289289
it { is_expected.to contain_class('apache::mod::disk_cache') }
@@ -303,7 +303,7 @@
303303
}'
304304
end
305305

306-
let(:params) {{ 'default_cache_enable' => 'foo'}}
306+
let(:params) { { 'default_cache_enable' => 'foo'} }
307307

308308
it { is_expected.to compile }
309309
it { is_expected.to contain_class('apache::mod::disk_cache') }
@@ -312,7 +312,7 @@
312312
it {
313313
is_expected.to contain_file('disk_cache.conf')
314314
.with(content: %r{CacheEnable disk \/\nCacheRoot \"\/var\/cache\/apache2\/mod_cache_disk\"\nCacheDirLevels 2\nCacheDirLength 1\nCacheIgnoreHeaders Set-Cookie})
315-
}.to raise_error(Puppet::Error, /default_cache_enable must be true or false/)
315+
}.to raise_error(Puppet::Error, %r/default_cache_enable must be true or false/)
316316
end
317317
end
318318
end

0 commit comments

Comments
 (0)