@@ -236,24 +236,35 @@ def vrrp_instance_file_name(name)
236
236
end
237
237
238
238
it ( 'should render a config file with the notify_stop correctly' ) do
239
- is_expected . to render_file ( file_name ) . with_content ( %r{notify_stop\s /path/to_stop\. sh} )
239
+ is_expected . to render_file ( file_name ) . with_content { |s |
240
+ expect ( s . scan ( %r{notify_stop\s /path/to_stop\. sh} ) . size ) . to eq ( 1 )
241
+ }
240
242
end
241
243
242
244
it ( 'should render a config file with the notify_master correctly' ) do
243
- is_expected . to render_file ( file_name ) . with_content ( %r{notify_master\s /path/to_master\. sh} )
245
+ is_expected . to render_file ( file_name ) . with_content { |s |
246
+ expect ( s . scan ( %r{notify_master\s /path/to_master\. sh} ) . size ) . to eq ( 1 )
247
+ }
244
248
end
245
249
246
250
it ( 'should render a config file with the notify_backup correctly' ) do
247
- is_expected . to render_file ( file_name ) . with_content ( %r{notify_backup\s /path/to_backup\. sh} )
251
+ is_expected . to render_file ( file_name ) . with_content { |s |
252
+ expect ( s . scan ( %r{notify_backup\s /path/to_backup\. sh} ) . size ) . to eq ( 1 )
253
+ }
248
254
end
249
255
250
256
it ( 'should render a config file with the notify_fault correctly' ) do
251
- is_expected . to render_file ( file_name ) . with_content ( %r{notify_fault\s /path/fault\. sh} )
257
+ is_expected . to render_file ( file_name ) . with_content { |s |
258
+ expect ( s . scan ( %r{notify_fault\s /path/fault\. sh} ) . size ) . to eq ( 1 )
259
+ }
252
260
end
253
261
254
262
it ( 'should render a config file with the notify correctly' ) do
255
- is_expected . to render_file ( file_name ) . with_content ( %r{notify\s /path/notify\. sh} )
263
+ is_expected . to render_file ( file_name ) . with_content { |s |
264
+ expect ( s . scan ( %r{notify\s /path/notify\. sh} ) . size ) . to eq ( 1 )
265
+ }
256
266
end
267
+
257
268
it ( 'should render a config file with the smtp_alert set to true' ) do
258
269
is_expected . to render_file ( file_name ) . with_content ( /smtp_alert\s true/ )
259
270
end
0 commit comments