How to use Spock library

First of all, Spock is a unit-testing library which is usually used with Grails and Groovy. So you have to import the spock dependency in the Build.groovy or Pom.xml:

‘org.spockframework:spock-core:1.0-groovy-2.4’

group: ‘cglib’, name: ‘cglib-nodep’, version: ‘2.2.2’

(* Cglib library, it is necessary for mocking objects)

How to catch Exceptions with Spock

With Spock you can check…

angel awakeprogrammer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store