Skip to content

Deravel/onboarding-spock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

First, read this document to get a general overview of the Spock framework.

Next, remove all answers by executing the following code...

./gradlew removeSolutions

At this point, all the *Spock tests in the following packages should fail.

com.example.basics
com.example.interaction
com.example.exception

For each package above (in order), go through the various tests in numeric order, filling in code to make the tests pass.

// SNIPPET START
<insert code here>
// SNIPPET END

For most *Spock classes there is a corresponding *Mockito class which serves as a comparison between spock and mockito and also demonstrates intent for each test. If you're having trouble with filling in a test, look at the corresponding mockito test for an example.

If you need assistance along the way, see spock documentation

After running through the basics, have a look at com.example.datadriven for a brief overview of data-driven tests in Spock. Also, com.example.gotchas goes over some non-obvious behavior to be aware of. Note that the tests in the gotchas package are intended to fail - the purpose is to show you the actual failures under these conditions in the hopes of recognizing if you run across them in the future.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published