Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Description

Spock is a testing and specification framework for Java and Groovy applications. What makes it stand out from the crowd is its beautiful and highly expressive specification language. This plugin brings the power of Spock to Griffon. It is a direct port of the Grails Spock plugin originally made by Luke Daley.

Installation

The current version of griffon-spock-plugin is 0.5.1
To install just issue the following command

Code Block
griffon install-plugin spock

Usage

The Spock project has excellent documentation to get you started writing specifications.

Running Tests

Tests are run just like normal Griffon tests via grails test-app . A new “spock” test type is added to the unit, integration and functional phases. You can use the Griffon 0.9 test type targeting feature to run only your Spock tests…

Code Block
griffon test-app :spock
Note

Class names of Spock tests must end in either "Spec" or "Specification". Otherwise, the Griffon test runner won't find them.

Scripts

  • create-unit-spec - creates a new Unit specification. Mimics GriffonUnitTestCase
  • create-integration-spec - creates a new Integration specification. Mimics a regular JUnit integration test

The Fest Plugin provides an additional spec script.

History

Version

Date

Notes

0.5.1

12-02-11

Fix GRIFFON-435

0.5

10-21-11

Release sync with Griffon 0.9.4

0.4

07-28-10

upgrade to Spock 0.5-groovy-1.8

0.3

12-21-10

release sync with Griffon 0.9.2

0.2

10-27-10

fixes GRIFFON-257

0.1

07-22-10

first release