Introduction to what is unit testing and discussion why it is important. Presenting a cool framework for writing unit tests in Groovy that can be used testing any code written in JVM language.
code (usually a method) that invokes another piece of code and checks the correctness of some assumptions afterward. If the assumptions turn out to be wrong, the unit test has failed. A "unit" is a method or function.
Groovy applications With beautiful and highly expressive speci cation language Compatible with most IDEs, build tools, and continuous integration servers Inspired from JUnit, jMock, RSpec, Groovy, Scala, Vulcans, and other fascinating life forms
"science officer of the starship Enterprise is Spock"() { given: def starship = new Starship("Enterprise", "Spock") when: def actual = starship.getScienceOfficer() then: actual == "Spock" } }