(data-from-example example)
return a vector of data as string as found in example row
return a vector of data as string as found in example row
(defafter f)
Define a function that will get executed AFTER every steps when exec-spec will be invoked (or in case of failure)
Define a function that will get executed AFTER every steps when exec-spec will be invoked (or in case of failure)
(defand regex params & body)
create and associate a regex to function params and body that will match the steps string in scenarios
create and associate a regex to function params and body that will match the steps string in scenarios
(defbefore f)
Define a function that will get executed BEFORE every steps when exec-spec will be invoked
Define a function that will get executed BEFORE every steps when exec-spec will be invoked
(defgiven regex params & body)
create and associate a regex to function params and body that will match the steps string in scenarios
create and associate a regex to function params and body that will match the steps string in scenarios
(defscenarios s)
associate scenarios in a file or resource given as a parameter with the steps contained in the enclosing namespace
associate scenarios in a file or resource given as a parameter with the steps contained in the enclosing namespace
(defthen regex params & body)
create and associate a regex to function params and body that will match the steps string in scenarios
create and associate a regex to function params and body that will match the steps string in scenarios
(defwhen regex params & body)
create and associate a regex to function params and body that will match the steps string in scenarios
create and associate a regex to function params and body that will match the steps string in scenarios
(examples examples-ast)
return a vector of map with header name as key and row value
return a vector of map with header name as key and row value
(exec-scenario scenario-ast)
for each step sentence, find the fn which have a regex that match execute that fn and input the return as first param of the next fn
for each step sentence, find the fn which have a regex that match execute that fn and input the return as first param of the next fn
(exec-scenario-with-examples scenario-ast)
run the scenario for each example rows, then for each step sentence find the fn which have a regex that match get the parameters value from the example and replace the parameter in the sentence then execute that fn with the parameters and input the return as first param of the next fn
run the scenario for each example rows, then for each step sentence find the fn which have a regex that match get the parameters value from the example and replace the parameter in the sentence then execute that fn with the parameters and input the return as first param of the next fn
(generate-step-fn step-sentence)
return a string representing a spexec macro call corresponding to the sentence step
return a string representing a spexec macro call corresponding to the sentence step
(matching-fn step-sentence)
return the tuple of fn/regex as a vector that match the step-sentence
return the tuple of fn/regex as a vector that match the step-sentence
(narrative-str narrative-ast)
transform a narrative tree to a string
transform a narrative tree to a string
(params-from-steps regex step-sentence)
return a vector of data as string as found in groups the regex found in the step sentence, if the data is a clojure data structure then it will be evaluated otherwise returned as a string, nil if no groups are found
return a vector of data as string as found in groups the regex found in the step sentence, if the data is a clojure data structure then it will be evaluated otherwise returned as a string, nil if no groups are found
Read the spec and execute each step with the code setup by the defgiven, defwhen and defthen macro
Read the spec and execute each step with the code setup by the defgiven, defwhen and defthen macro
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close