Skip to content

Commit 2aa7689

Browse files
committed
escape special chars in regex spec tests
1 parent a0580b5 commit 2aa7689

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spec/defines/vhost_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@
379379
'request_headers' => ['append MirrorID "mirror 12"'],
380380
'rewrites' => [
381381
{
382-
'rewrite_rule' => ['^index\.html$ rewrites.html'],
382+
'rewrite_rule' => ['^index.html$ rewrites.html'],
383383
},
384384
],
385385
'filters' => [
@@ -392,7 +392,7 @@
392392
'FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no',
393393
],
394394
'rewrite_base' => '/',
395-
'rewrite_rule' => '^index\.html$ welcome.html',
395+
'rewrite_rule' => '^index.html$ welcome.html',
396396
'rewrite_cond' => ['%{HTTP_USER_AGENT} ^MSIE'],
397397
'rewrite_inherit' => true,
398398
'setenv' => ['FOO=/bin/true'],
@@ -737,7 +737,7 @@
737737
.with_content(%r{^\s+RewriteEngine On$})
738738
.with_content(%r{^\s+RewriteOptions Inherit$})
739739
.with_content(%r{^\s+RewriteBase /})
740-
.with_content(%r{^\s+RewriteRule ^index\.html$ welcome.html$})
740+
.with_content(%r{^\s+RewriteRule \^index\.html\$ rewrites.html$})
741741
}
742742
it { is_expected.to contain_concat__fragment('rspec.example.com-scriptalias') }
743743
it { is_expected.to contain_concat__fragment('rspec.example.com-serveralias') }
@@ -1817,7 +1817,7 @@
18171817
is_expected.not_to contain_concat__fragment('rspec.example.com-rewrite')
18181818
.with_content(%r{^\s+RewriteOptions Inherit$})
18191819
.with_content(%r{^\s+RewriteEngine On$})
1820-
.with_content(%r{^\s+RewriteRule ^index\.html$ welcome.html$})
1820+
.with_content(%r{^\s+RewriteRule \^index\.html\$ welcome.html$})
18211821
}
18221822
end
18231823
context 'empty rewrites_without_rewrite_inherit' do
@@ -1831,7 +1831,7 @@
18311831
it {
18321832
is_expected.not_to contain_concat__fragment('rspec.example.com-rewrite')
18331833
.with_content(%r{^\s+RewriteEngine On$})
1834-
.with_content(%r{^\s+RewriteRule ^index\.html$ welcome.html$})
1834+
.with_content(%r{^\s+RewriteRule \^index\.html\$ welcome.html$})
18351835
.without(content: %r{^\s+RewriteOptions Inherit$})
18361836
}
18371837
end

0 commit comments

Comments
 (0)