Date: 2014-08-08, amended 2026-08-30
Accepted
Steps need to share data: the product a When creates is the one a Then checks. Cucumber implementations use a world object, often filled by dependency injection.
Each step receives, as first argument, what the previous step returned -- like a chain of Ring handlers. The first step receives {}, or the feature's :default-scenario-state.
Amended 2026-08-30: a step returning nil or a boolean keeps the state it was given. That is what an assertion (is) or a side effect (doseq, println) returns, and a defthen that forgot its trailing state silently replaced the state with true.
nil or false.Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |