Author Login
Post Reply
Hi,
In my unit test I'm overriding the get static method with the following:
User.metaClass.static.get = {Integer id -> return null}
When I run my test suite, this overriding affects other tests that call
User.get(). I therefore need to call
GroovySystem.metaClassRegistry.removeMetaClass.remove User in tearDown(),
but this appears to remove all of the dynamically added methods from User
(my other unit test says the method get() not found).
How do I get round this?
Thanks
Nick
--
Sent from the groovy - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email