i would like to mock a web service response. The response is a XML, and contains both simple quotes and double quotes.
The response is pretty big, so here are my solutions:
-
trim the response to make it smaller and backslash the simple quotes for example
-
backslash the simple quotes for example
-
add the response to a file and parse it
But the thing is, I’d like to test a large response, and not create a resource test folder with a file. And as you can imagine, backslashing everything is long and boring.
I also tried the triple double quote, not working of course.
How would you do it?
You could use Ruby here documents.