File: stats_formatters.feature

package info (click to toggle)
cucumber 1.3.17-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,296 kB
  • ctags: 1,812
  • sloc: ruby: 13,576; python: 28; sh: 10; makefile: 10; tcl: 3
file content (73 lines) | stat: -rw-r--r-- 2,030 bytes parent folder | download | duplicates (2)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Feature: Usage formatter
  In order to see where step definitions are used
  Developers should be able to see a list of step definitions and their use

  Background:
    Given a file named "features/f.feature" with:
      """
      Feature: F
        Background: A
          Given A
        Scenario: B
          Given B
        Scenario Outline: C
          Given <x>
          And B
          Examples:
            |x|
            |C|
        Scenario: AC
          Given A
          Given C
      """
    And a file named "features/step_definitions/steps.rb" with:
      """
      Given /A/ do;end
      Given /B/ do;end
      Given /C/ do;end
      Given /D/ do;end
      """

  Scenario: Run with --format usage
    When I run `cucumber -f usage --dry-run`
    Then it should pass with exactly:
      """
      ---------
      
      /A/         # features/step_definitions/steps.rb:1
        Given A   # features/f.feature:3
        Given A   # features/f.feature:3
        Given A   # features/f.feature:3
        Given A   # features/f.feature:13
      /B/         # features/step_definitions/steps.rb:2
        Given B   # features/f.feature:5
        And B     # features/f.feature:8
      /C/         # features/step_definitions/steps.rb:3
        Given <x> # features/f.feature:7
        Given C   # features/f.feature:14
      /D/         # features/step_definitions/steps.rb:4
        NOT MATCHED BY ANY STEPS
      
      3 scenarios (3 skipped)
      8 steps (8 skipped)
      0m0.012s

      """

    Scenario: Run with --format stepdefs
      When I run `cucumber -f stepdefs --dry-run`
      Then it should pass with exactly:
        """
        ---------
        
        /A/   # features/step_definitions/steps.rb:1
        /B/   # features/step_definitions/steps.rb:2
        /C/   # features/step_definitions/steps.rb:3
        /D/   # features/step_definitions/steps.rb:4
          NOT MATCHED BY ANY STEPS
        
        3 scenarios (3 skipped)
        8 steps (8 skipped)
        0m0.012s

        """