Skip to content

Commit

Permalink
Use string instead, not regex, for file test
Browse files Browse the repository at this point in the history
The beaker-rspec contains matcher does not understand "+" in the
context of checking whether a string is contained in a file resource
(though it does seem to understand "\s" just fine), which was causing
acceptance test failures. Since we know the exact string to expect we
just remove the regular expression bits.
  • Loading branch information
Colleen Murphy committed Apr 14, 2015
1 parent 2858f98 commit 3c20633
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/acceptance/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class { 'apache': }
describe file("#{$vhost_dir}/25-proxy.example.com.conf") do
it { is_expected.to contain '<VirtualHost \*:80>' }
it { is_expected.to contain "ServerName proxy.example.com" }
it { is_expected.to contain "ProxyPassMatch\s+/foo http://backend-foo/" }
it { is_expected.to contain "ProxyPassMatch /foo http://backend-foo/" }
it { is_expected.to contain "ProxyPreserveHost On" }
it { is_expected.to contain "ProxyErrorOverride On" }
it { is_expected.not_to contain "<Proxy \*>" }
Expand Down

0 comments on commit 3c20633

Please sign in to comment.