Showing posts with label Specification. Show all posts
Showing posts with label Specification. Show all posts

Tuesday, August 6, 2013

Spock - return nested spies / mocks


Hi! Some time ago I have written an article about Mockito and using RETURNS_DEEP_STUBS when working with JAXB. Quite recently we have faced a similliar issue with deeply nesetd JAXB and the awesome testing framework written in Groovy called Spock. Natively Spock does not support creating deep stubs or spies so we needed to create a workaround for it and this article will show you how to do it.