Grails clean global mock on integration tests to avoid polluted environment

So, you are using Grails/Groovy for your app and Spock as testing framework. You have an integration test that is testing something on a class that has another dependencies that you have to mock. Something like:

Just a little addendum here: in Spock, everything that is instantiated on given: block is not cleaned with […]

Continue reading