Skip to content

Commit d75e4d3

Browse files
author
Morgan Haskel
committed
Fix unit test failures with ruby 1.8.7
rspec with 1.8.7 seems to be having issues with trailing commas and unescaped '{' or '}' within the %r{} block.
1 parent 87be490 commit d75e4d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/classes/apache_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
it { is_expected.to contain_group("www-data") }
2525
it { is_expected.to contain_class("apache::service") }
2626
it { is_expected.to contain_file("/var/www").with(
27-
'ensure' => 'directory',
27+
'ensure' => 'directory'
2828
)
2929
}
3030
it { is_expected.to contain_file("/etc/apache2/sites-enabled").with(
@@ -168,7 +168,7 @@
168168
end
169169

170170
it { is_expected.to contain_file("/etc/apache2/apache2.conf").with_content %r{^LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common\n} }
171-
it { is_expected.to contain_file("/etc/apache2/apache2.conf").with_content %r{^LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" vhost_combined\n} }
171+
it { is_expected.to contain_file("/etc/apache2/apache2.conf").with_content %r{^LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%\{Referer\}i\" \"%\{User-agent\}i\"" vhost_combined\n} }
172172
end
173173
end
174174

@@ -230,7 +230,7 @@
230230
it { is_expected.to contain_group("apache") }
231231
it { is_expected.to contain_class("apache::service") }
232232
it { is_expected.to contain_file("/var/www/html").with(
233-
'ensure' => 'directory',
233+
'ensure' => 'directory'
234234
)
235235
}
236236
it { is_expected.to contain_file("/etc/httpd/conf.d").with(
@@ -507,7 +507,7 @@
507507
it { is_expected.to contain_group("www") }
508508
it { is_expected.to contain_class("apache::service") }
509509
it { is_expected.to contain_file("/usr/local/www/apache22/data").with(
510-
'ensure' => 'directory',
510+
'ensure' => 'directory'
511511
)
512512
}
513513
it { is_expected.to contain_file("/usr/local/etc/apache22/Vhosts").with(

0 commit comments

Comments
 (0)