From d75e4d32423338f56bbeac2540fcf846860b329b Mon Sep 17 00:00:00 2001 From: Morgan Haskel Date: Fri, 7 Nov 2014 11:37:33 -0800 Subject: [PATCH] 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. --- spec/classes/apache_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/classes/apache_spec.rb b/spec/classes/apache_spec.rb index c1ecf80cc..fe61a9796 100644 --- a/spec/classes/apache_spec.rb +++ b/spec/classes/apache_spec.rb @@ -24,7 +24,7 @@ it { is_expected.to contain_group("www-data") } it { is_expected.to contain_class("apache::service") } it { is_expected.to contain_file("/var/www").with( - 'ensure' => 'directory', + 'ensure' => 'directory' ) } it { is_expected.to contain_file("/etc/apache2/sites-enabled").with( @@ -168,7 +168,7 @@ end 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} } - 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} } + 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} } end end @@ -230,7 +230,7 @@ it { is_expected.to contain_group("apache") } it { is_expected.to contain_class("apache::service") } it { is_expected.to contain_file("/var/www/html").with( - 'ensure' => 'directory', + 'ensure' => 'directory' ) } it { is_expected.to contain_file("/etc/httpd/conf.d").with( @@ -507,7 +507,7 @@ it { is_expected.to contain_group("www") } it { is_expected.to contain_class("apache::service") } it { is_expected.to contain_file("/usr/local/www/apache22/data").with( - 'ensure' => 'directory', + 'ensure' => 'directory' ) } it { is_expected.to contain_file("/usr/local/etc/apache22/Vhosts").with(