-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfail-on-undefined-step.feature
18 lines (18 loc) · 1.02 KB
/
fail-on-undefined-step.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Feature: Fail On Undefined step
As a programmer, I want my tests to fail if there are any undefined steps
Scenario: Test behat tests with undefined step. Test will fail.
Given I run "behat --config tests/fixtures/undefined-steps/behat.yml.dist -l 20"
Then it should fail with:
"""
Tests has undefined steps!
"""
And I should see progress bar
Scenario: If I run behat with option --fail-on-undefined-step and test will have undefined step then test will fail.
Given I run "behat --no-interaction --fail-on-undefined-step --config tests/fixtures/undefined-steps/behat.yml.dist tests/fixtures/undefined-steps/suite02/undefined.feature"
Then it should fail with:
"""
Tests has undefined steps!
"""
Scenario: If I run behat without option --fail-on-undefined-step and test will have undefined step then test will pass.
Given I run "behat --no-interaction --config tests/fixtures/undefined-steps/behat.yml.dist tests/fixtures/undefined-steps/suite02/undefined.feature"
Then it should pass