GSpec logoGSpec is a prototype project that emulates RSpec. It is written in the Groovy programming language and aims to bring Behaviour Driven Development to the Java platform in the most natural way possible. Read more about it here.

Download GSpec source code from Groovy’s Subversion Trunk.
(Subversion trunk has nothing to do with a storage compartment in a Navy vessel. Rather it referrs to latest revision of source code stored on a popular source control management system where egg-heads like myself manage their programming projects. You’ll want to use the subversion client to talk to the trunk. It’s easier that way.)

GSpec in Action

the.context('A public Library') {
    initially() {
        the.library = new PublicLibrary()

    specify('A book that is checked out should be due back in one week') { = the.library.borrowBookByName( 'Groovy In Action' )

the.context('An overdue book') {
    initially() {
        the.library = new PublicLibrary() = the.library.borrowBookByName( 'Groovy In Action' )
        thelibrary.operationalDate =

    specify('The goons should be sent to recover overdue books.') {
        the.assasins = the.library.releaseAssasins()
        the.assasins.booksToKillFor.should_contain 'Groovy In Action'

(GSpec is still alpha and experimental, the above example is not guaranteed to work or compile.GSpec compiler sold separately. See your licensed GSpec dealer for details.)

8 thoughts on “GSpec

  1. Man I’d love to get working on GSpec again. Even mentioning the name GSpec makes me feel dirty. Sooo many projects, so little time… Just to give you an idea of what I’m facing, I’m learning J2ME, trying to bring the magic of BDD to the J2ME community, wrapping an Ant build with M2, cutting releases with M2, learning both Artifactory and Archiva trying to decide which is better, studying TTS and VR, implementing ad-hoc speaky thingies that work over the network between a J2ME device and a backend Java speech server, volunteering at a local community center where I rebuild old PCs throwing Linux on them, trying to figure out why the Linux box on my desk that never gets used recently started sounding like a Jet engine, trying to finish a hip-hop site for my big bro on the side, creating animated characters with Xara, taking my kids to Gymnastics and soccer practice… oh and somewhere in there I have my work related stuff. I really want to do it all, but something has to drop.

    1. Yes, I’ve stopped development on this project long ago. I would like to resurrect it if I have time but zoo much has changed it would likely mean starting from scratch.

      1. Humm I see, what do you recommend as an alternative? I’m currently diving into TDD/BDD, and i’m exploring cucumber-jvm for functional testing, and maybe Spock for specifications. Any way if you ever think of bringing this back to life let me know, maybe we can collaborate on that.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s