In the past, for PHP project's, I have used Behat in conjunction with the api-extension to write component level tests. Behat shares a common philosophies with cucumber. I would therefore like to known if there is an equivalent api extension I could use for cucumber in a Clojure project?
This is the kind of test I would like to create:
Feature: MyFeature
Scenario: do somthing
Given the request body is:
"""
{
"key": "val"
}
"""
And the "Content-Type" request header is "application/json"
When I request "/route" using HTTP POST
Then the response code is 200
Then the response body contains JSON:
"""
{
"meta": {
"status": "@variableType(string)"
},
"data": {
"key": "@variableType(integer)"
}
}
"""