Skip to content

Commit

Permalink
Fix unit test failures with ruby 1.8.7
Browse files Browse the repository at this point in the history
rspec with 1.8.7 seems to be having issues with trailing commas and
unescaped '{' or '}' within the %r{} block.
  • Loading branch information
Morgan Haskel committed Nov 7, 2014
1 parent 87be490 commit d75e4d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/classes/apache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit d75e4d3

Please sign in to comment.