3
Using the `--strict` flag will cause cucumber to fail unless all the
4
step definitions have been defined.
7
Given a file named "features/missing.feature" with:
11
Given this step passes
13
And a file named "features/pending.feature" with:
17
Given this step is pending
20
Scenario: Fail with --strict due to undefined step
21
When I run `cucumber -q features/missing.feature --strict`
22
Then it should fail with:
27
Given this step passes
28
Undefined step: "this step passes" (Cucumber::Undefined)
29
features/missing.feature:3:in `Given this step passes'
31
1 scenario (1 undefined)
35
Scenario: Fail with --strict due to pending step
36
Given the standard step definitions
37
When I run `cucumber -q features/pending.feature --strict`
38
Then it should fail with:
43
Given this step is pending
44
TODO (Cucumber::Pending)
45
./features/step_definitions/steps.rb:3:in `/^this step is pending$/'
46
features/pending.feature:3:in `Given this step is pending'
48
1 scenario (1 pending)
52
Scenario: Succeed with --strict
53
Given the standard step definitions
54
When I run `cucumber -q features/missing.feature --strict`
55
Then it should pass with:
60
Given this step passes