-
Notifications
You must be signed in to change notification settings - Fork 14
/
missing_scenario_name.feature
57 lines (49 loc) · 1.27 KB
/
missing_scenario_name.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Feature: Missing Scenario Name
As a Customer
I want named scenarios
so that I know what this scenario is about without reading it
Background: Prepare Testee
Given a file named "lint.rb" with:
"""
$LOAD_PATH << '../../lib'
require 'gherkin_lint'
linter = GherkinLint::GherkinLint.new
linter.enable %w(MissingScenarioName)
linter.set_linter
linter.analyze 'lint.feature'
exit linter.report
"""
Scenario: Missing Scenario Name
Given a file named "lint.feature" with:
"""
Feature: Test
Scenario:
"""
When I run `ruby lint.rb`
Then it should fail with exactly:
"""
MissingScenarioName - No Scenario Name
lint.feature (2): Test
"""
Scenario: Missing Scenario Outline Name
Given a file named "lint.feature" with:
"""
Feature: Test
Scenario Outline:
"""
When I run `ruby lint.rb`
Then it should fail with exactly:
"""
MissingScenarioName - No Scenario Name
lint.feature (2): Test
"""
Scenario: Valid Example
Given a file named "lint.feature" with:
"""
Feature: Test
Scenario: A
"""
When I run `ruby lint.rb`
Then it should pass with exactly:
"""
"""