So, I'm writing a service that, being in rails, I'm pretty indifferent about how people connect. I do auth at the http layer, so if people want xml or json, I could care less.
I'm overriding to_json and to_xml, but I'm using the same arguments for both. 'include this', 'don't include that', etc.
How are other people doing this to check that the behavior is the same? Maybe just set one set of arguments and use them in both methods? Or maybe have methods that verify the JSON.from_xml(myobject.to_xml) == myobject.to_json? I'd like to not have to do all my tests twice if I can help it.