gherkin v1.4.0 Gherkin
See Gherkin.parse/1
for primary usage.
Summary
Functions
Given a Gherkin.Element.Feature
, changes all Gherkin.Elements.ScenarioOutline
s
into Gherkin.ElementScenario
as a flattened list of scenarios
Primary helper function for parsing files or streams through Gherkin
. To use
simply call this function passing in the full text of the file or a file stream
Changes a Gherkin.Elements.ScenarioOutline
into multiple Gherkin.Elements.Scenario
s
so that they may be executed in the same manner
Functions
Given a Gherkin.Element.Feature
, changes all Gherkin.Elements.ScenarioOutline
s
into Gherkin.ElementScenario
as a flattened list of scenarios.
Primary helper function for parsing files or streams through Gherkin
. To use
simply call this function passing in the full text of the file or a file stream.
Example:
%Gherkin.Elements.Feature{scenarios: scenarios} = File.read!("test/features/coffee.feature") |> Gherkin.parse()
# Do something with `scenarios`
# Also supports file streams for larger files (must read by lines, bytes not supported)
%Gherkin.Elements.Feature{scenarios: scenarios} = File.stream!("test/features/coffee.feature") |> Gherkin.parse()
Changes a Gherkin.Elements.ScenarioOutline
into multiple Gherkin.Elements.Scenario
s
so that they may be executed in the same manner.
Given an outline, its easy to run all scenarios:
outline = %Gherkin.Elements.ScenarioOutline{}
Gherkin.scenarios_for(outline) |> Enum.each(&run_scenario/1)