kale v0.7.0 Kale.Macros View Source

Macros, automatically imported by use Kale.

Link to this section Summary

Functions

Generate a step definition matching a particular string and optionally a context map. See the module documentation for usage examples.

Generate a feature block, which corresponds to an ExUnit describe.

Generate a scenario block, which corresponds to an ExUnit test.

Link to this section Functions

Link to this macro

defgiven(step, context \\ {:%{}, [], []}, list) View Source (macro)
defgiven(String.t(), Macro.t(), [{:do, Macro.t()}]) :: Macro.t()

Generate a step definition matching a particular string and optionally a context map. See the module documentation for usage examples.

The given, when and then steps are actually interchangeable – the separate macros are provided for readability only.

Link to this macro

defthen(step, context \\ {:%{}, [], []}, list) View Source (macro)
defthen(String.t(), Macro.t(), [{:do, Macro.t()}]) :: Macro.t()

An alias for defgiven/2.

Link to this macro

defwhen(step, context \\ {:%{}, [], []}, list) View Source (macro)
defwhen(String.t(), Macro.t(), [{:do, Macro.t()}]) :: Macro.t()

An alias for defgiven/2.

Link to this macro

feature(name, list) View Source (macro)
feature(String.t(), [{:do, Macro.t()}]) :: Macro.t()

Generate a feature block, which corresponds to an ExUnit describe.

Link to this macro

scenario(name, body) View Source (macro)
scenario(String.t(), String.t()) :: Macro.t()

Generate a scenario block, which corresponds to an ExUnit test.