I have a resource which creates an XML file via an erb template and I'd like to test its content via XPath. I found Nokogiri library and it works but I need to access the content of the rendered file as a string.
I tried:
content = catalogue.resource('file', '/path/to/file.xml').send(:parameters)[:content]
but I get:
undefined method `parameters' for nil:NilClass
My puppet version is 5.5.17.
Is there an alternative way to access the content of a rendered .erb template as a string?