Skip to content

Instantly share code, notes, and snippets.

@ddelponte
Created September 12, 2013 12:29
Show Gist options
  • Save ddelponte/6536552 to your computer and use it in GitHub Desktop.
Save ddelponte/6536552 to your computer and use it in GitHub Desktop.
runAsync mocking
service.metaClass.runAsync = { it() }
// The first line basically says ‘take the code within the runAsync closure, and just execute it’.
// http://fbflex.wordpress.com/2011/10/26/grails-quick-tip-testing-spock-interactions-wrapped-by-the-executor-plugin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment