WhiteBread.Gherkin.Parser.Steps

Summary

add_step_to_scenario(scenario, line)

Takes a string representing a step and adds it to the scenario as a struct

string_to_step(string)

Returns the appropriate struct for a step string

Functions

add_step_to_scenario(scenario, line)

Takes a string representing a step and adds it to the scenario as a struct

Examples

iex> add_step_to_scenario(%{steps: []}, “When I add this line”) %{steps: [%Steps.When{text: "I add this line"}]}

string_to_step(string)

Returns the appropriate struct for a step string

Examples

iex> string_to_step(“Given this works”) %Steps.Given{text: “this works”}

iex> string_to_step(“Then it might be useful”) %Steps.Then{text: “it might be useful”}