File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 5353 title : 'should set address' ,
5454 attr : 'address' ,
5555 value : '$remote_addr' ,
56- match : 'geo $remote_addr $client_network {'
56+ match : 'geo \ $remote_addr \ $client_network {'
5757 } ,
5858 {
5959 title : 'should set ranges' ,
109109 it { is_expected . to contain_file ( "/etc/nginx/conf.d/#{ title } -geo.conf" ) . with_mode ( '0644' ) }
110110
111111 it param [ :title ] do
112- verify_contents ( catalogue , "/etc/nginx/conf.d/#{ title } -geo.conf" , Array ( param [ :match ] ) )
112+ Array ( param [ :match ] ) . each do |match_item |
113+ is_expected . to contain_file ( "/etc/nginx/conf.d/#{ title } -geo.conf" ) . with_content ( Regexp . new ( match_item ) )
114+ end
113115 Array ( param [ :notmatch ] ) . each do |item |
114116 is_expected . to contain_file ( "/etc/nginx/conf.d/#{ title } -geo.conf" ) . without_content ( item )
115117 end
Original file line number Diff line number Diff line change 136136 it { is_expected . to contain_file ( "/etc/nginx/conf.d/#{ title } -map.conf" ) . with_mode ( '0644' ) }
137137
138138 it param [ :title ] do
139- verify_contents ( catalogue , "/etc/nginx/conf.d/#{ title } -map.conf" , Array ( param [ :match ] ) )
139+ Array ( param [ :match ] ) . each do |match_item |
140+ is_expected . to contain_file ( "/etc/nginx/conf.d/#{ title } -map.conf" ) . with_content ( Regexp . new ( match_item ) )
141+ end
140142 Array ( param [ :notmatch ] ) . each do |item |
141143 is_expected . to contain_file ( "/etc/nginx/conf.d/#{ title } -map.conf" ) . without_content ( item )
142144 end
You can’t perform that action at this time.
0 commit comments