Pledgez is a project mainly written in Groovy, it's free.
Concise BDD framework for Groovy, inspired by Vows
h1. Pledgez - concise BDD framework for Groovy
h2. Intro
Pledgez is a "behavior driven development":http://en.wikipedia.org/wiki/Behavior_Driven_Development framework for Groovy, which aims for tests syntax to be as concise as possible.
It is -stolen from- heavily inspired by "Vows":http://vowsjs.org. However Groovy actually allows for more concise syntax.
h2. Sample
Usage of Pledgez is very simple. Here's an example ported from Vows.
import com.componentix.pledgez.Pledges
Pledges.describe("Division By Zero").addBatch([
"when dividing a number by zero": [
topic: { 42f / 0f },
"we get Infinity": { it == Float.POSITIVE_INFINITY }
],
"but when dividing zero by zero": [
topic: { 0f / 0f },
"we get a value which": [
"is not a number": { it.isNaN() },
// This is not true in Groovy and so will fail
"is not equal to itself": { it != it }
]
]
]).run()