cheeky monkey patch to capture printed YAML and compare to expected