Q:

Grails spock unit testing not consistent

I have a class with a method which returns XML. Along with this I have a Spock unit test. The test works fine in isolation ie if I do test-app :unit TestSpec. 
However it throws an error - 
Cannot cast object 'com.mypackage.SequencePartResponse@518a824' with class 'com.mypackage.SequencePartResponse' to class 'grails.converters.XML' 
when I run ALL my tests (test-app :unit). I found a similar problem on stackOverflow (12098289) which suggested using 'addConvertors(offendingClassName)' to cure this but that isn't working with Spock. it just throws a method not found error. 
Anyone any ideas how to sort this? 

A:

Well I found a way to make it work  .. Rather than  rendering as XML in my controller  -  "render someObject as XML" , I do "render new XML(someObject)" .. Though if someone could explain what's going on i'd appreciate it    

