Andreas Fuchs' Journal

I hack on things for people.

I Think This Is Going to Be Pretty Sweet.

I’ve been toying around with making a Common Lisp adapter to Cucumber, a behavior-driven development tool. I think this will really be very sweet.

Here’s how the step definition file would look like (these are really just stubs; in reality, you’d put in the lisp code you want to happen for the given textual description):

Clucumber example steps
1
2
3
4
5
6
7
8
(Given* #?"^I start clucumber in (.*)$" (path)
  (assert path))

(When* #?"^I define some-other-package as the test package$" ()
  (pending))

(Then* #?"^the current package should be \"([^\"]+)\"$" (package-name)
  (pending (format nil "package is ~A" package-name)))

Lisp