I have a unit test that demonstrates some inconsistent behavior with a Hash being converted to XML with the :root option. Sometimes it works fine:
Hash.new.to_xml(:root => 'test') "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<test>\n</test>\n"
But sometimes I get an argument error:
Hash.new.to_xml(:root => 'test') ArgumentError Exception: wrong number of arguments (1 for 0)
I thought it may be a bug related to the version of Rails, but I have tried several versions and have the same problem. Anyone have any ideas of where I should be looking?
Thanks, Tom