Exemple #1
0
def test_parse_title():

    parser = Parser([(1, gherkin.TOKEN_TEXT, "Scenario title"), (1, gherkin.TOKEN_NEWLINE, "\n")])

    feature = parser.parse_title()

    feature.should.equal(Ast.Text(line=1, text="Scenario title"))
Exemple #2
0
def test_parse_empty_title():

    parser = Parser([(1, gherkin.TOKEN_NEWLINE, "\n"), (2, gherkin.TOKEN_TEXT, "more text after title")])

    feature = parser.parse_title()

    feature.should.be.none
Exemple #3
0
def test_parse_title():

    parser = Parser([
        (1, gherkin.TOKEN_TEXT, 'Scenario title'),
        (1, gherkin.TOKEN_NEWLINE, '\n'),
    ])

    feature = parser.parse_title()

    feature.should.equal(Ast.Text(line=1, text='Scenario title'))
Exemple #4
0
def test_parse_empty_title():

    parser = Parser([
        (1, gherkin.TOKEN_NEWLINE, '\n'),
        (2, gherkin.TOKEN_TEXT, 'more text after title'),
    ])

    feature = parser.parse_title()

    feature.should.be.none