In my controller I have some methods which return json as well as xml data.
I need to test those actions. For testing the json part I found this reference and it is working fine. Now I am need of testing the actions for the XML part.
Anyone who can help or suggest something are most welcome I’ve been scratching my head for an hour now but to no avail.
Please help. Thanks in advance.
In my controller I have some methods which return json as well as xml
Share
when you request your controller you specify the format you want. After parse the result with Nokogiri and see if your XML is valid or not