- Author: Tony Spencer
- License: BSD-3-Clause license
- Documentation: https://github.com/denzuko/sunny-side/blob/develop/README.md
- Source: https://github.com/denzuko/sunny-side/
Supported Gherkin subset
Feature, Background, Scenario, and Given/When/Then/And/ But steps, with #-comments and blank lines ignored, doc strings, data tables, tags.Not supported, yet: Scenario Outline/Examples tables
Installation
# edge repo qlot add sunny-side https://github.com/denzuko/sunny-side qlot install # ultralisp.org repo qlot exec ros -e '(ql:quickload :sunny-side)'
Usage
;; steps.lisp
(sunny-side:Given! "^a fresh counter$" ()
(setf *count* 0))
(sunny-side:When! "^I increment it$" ()
(incf *count*))
(sunny-side:Then! "^the count should be (\\d+)$" (expected)
(fiveam:is (= (parse-integer expected) *count*)))
(sunny-side:define-feature-tests
#.(asdf:system-relative-pathname :my-project "features/counter.feature")
:suite my-project-gherkin-suite)
(defun run-bdd ()
(fiveam:run! 'my-project-gherkin-suite))
The keyword a step is written under (Given, When, Then, And, or But) is cosmetic. Matching happens by regex text alone, the same way real Cucumber matches steps, so an And-continuation of a prior step matches whichever registered regex fits its text, not a type-specific one tied to the keyword above it.