File: fail_fast.feature

package info (click to toggle)
cucumber 2.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,076 kB
  • sloc: ruby: 17,016; javascript: 4,641; makefile: 12; sh: 10; tcl: 3
file content (46 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download | duplicates (4)
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
@spawn
Feature: Fail fast

  The --fail-fast flag causes Cucumber to exit immediately after the first 
  scenario fails.

  Scenario: When a scenario fails
    Given a file named "features/bad.feature" with:
      """
      Feature: Bad
        Scenario: Failing
          Given this step fails
      """
    And a file named "features/good.feature" with:
    """
    Feature: Good
      Scenario: Passing
        Given this step passes
    """
    And the standard step definitions
    When I run `cucumber --fail-fast`
    Then it should fail
    And the output should contain:
    """
    1 scenario (1 failed)
    """

  Scenario: When all the scenarios pass
    Given a file named "features/first.feature" with:
      """
      Feature: first feature
        Scenario: foo first
          Given this step passes
        Scenario: bar first
          Given this step passes
      """
    And a file named "features/second.feature" with:
      """
      Feature: second
        Scenario: foo second
          Given this step passes
        Scenario: bar second
          Given this step passes
      """
    When I run `cucumber --fail-fast`
    Then it should pass