Improved tests around guards

This is still not perfect.  Will likely need to do integration
tests with serverspec.