-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathtoo_clumsy.feature
57 lines (51 loc) · 1.55 KB
/
too_clumsy.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: Too Clumsy
As a Business Analyst
I want to write readable scenarios
so that they are attractive enough to read
Background: Prepare Testee
Given a file named "lint.rb" with:
"""
$LOAD_PATH << '../../lib'
require 'gherkin_lint'
linter = GherkinLint::GherkinLint.new
linter.enable %w(TooClumsy)
linter.set_linter
linter.analyze 'lint.feature'
exit linter.report
"""
Scenario: Long Scenario
Given a file named "lint.feature" with:
"""
Feature: Test
Scenario: A
Given something
And another nice and shiny and green and blue thing
And maybe still something which is also nice and shine and has a similar color
But its color is not that nice as the color of the first thing
When compare the colors of the both things
And wait some time but not too long but quite a time
And then execute it again
Then it should be executed
And verification should be possible
But result shouldn't be 23
And also not 42
And probably also not 1337
"""
When I run `ruby lint.rb`
Then it should fail with exactly:
"""
TooClumsy - Used 401 Characters
lint.feature (2): Test.A
"""
Scenario: Valid Example
Given a file named "lint.feature" with:
"""
Feature: Test
Scenario: A
When action
Then verification
"""
When I run `ruby lint.rb`
Then it should pass with exactly:
"""
"""