Created
January 28, 2012 18:46
-
-
Save zsprackett/1695402 to your computer and use it in GitHub Desktop.
rspec-puppet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this works | |
it { should \ | |
contain_file("/etc/httpd/vhosts.d/#{t}.sjc.sugarcrm.pvt.conf")\ | |
.with_content(/ServerName #{t}.sjc.sugarcrm.pvt/) } | |
# this ignores the argument and tests for an empty file | |
it { should \ | |
contain_file("/etc/httpd/vhosts.d/#{t}.sjc.sugarcrm.pvt.conf")\ | |
.without_content(/VirtualHost \*:443/) } | |
# this doesn't work because the should_not is asserted on contain_file | |
it { should_not \ | |
contain_file("/etc/httpd/vhosts.d/#{t}.sjc.sugarcrm.pvt.conf")\ | |
.without_content(/VirtualHost \*:443/) } | |
# what's the proper way to test for this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment