Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noblesamurai/shallot
a lexer/parser for Gherkin
https://github.com/noblesamurai/shallot
Last synced: about 1 month ago
JSON representation
a lexer/parser for Gherkin
- Host: GitHub
- URL: https://github.com/noblesamurai/shallot
- Owner: noblesamurai
- License: other
- Created: 2012-03-16T11:20:37.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-03-16T11:18:50.000Z (almost 13 years ago)
- Last Synced: 2023-03-11T05:29:48.876Z (almost 2 years ago)
- Language: Ruby
- Homepage:
- Size: 90.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: COPYING
Awesome Lists containing this project
README
= shallot
shallot can lex and parse just enough Gherkin to give you:
{:feature=>"The name of the feature",
:background=>
[" Each step in the background",
" But without any additional parsing",
" Or validation",
""],
:scenarios=>
[{:name=>"And each scenario",
:outline=>false,
:tags=>["shallot", "regression", "bug"],
:contents=>
[" With tags, including those inherited",
" From the feature level tags",
""]},
{:name=>"As well as scenario outlines",
:outline=>true,
:tags=>["shallot", "feature"],
:contents=>
[" With support for the following",
" \"\"\"",
" long-quoted",
" sections",
" \"\"\"",
" While no extra for examples",
"",
" Examples:",
" | kind |",
" | parsing |",
" | lexing |"]}]}The above results from calling Shallot.parse(f), where f is an open File
handle on the following feature file:@shallot
Feature: The name of the feature
This gets completely ignored.Background:
Each step in the background
But without any additional parsing
Or validation@regression @bug
Scenario: And each scenario
With tags, including those inherited
From the feature level tags@feature
Scenario Outline: As well as scenario outlines
With support for the following
"""
long-quoted
sections
"""
While no extra for examplesExamples:
| kind |
| parsing |
| lexing |== Copyright
Copyright (c) 2011 Noble Samurai. See LICENSE.txt for
further details.