WhiteBread v2.8.1 WhiteBread.Gherkin.Parser.Helpers.Steps

Summary

Functions

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

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"}]}

process_background_step_line(line, feature)
process_scenario_step_line(line, feature)
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”}