File: tags.feature

package info (click to toggle)
ruby-cucumber-wire 0.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 224 kB
  • sloc: ruby: 754; makefile: 3
file content (86 lines) | stat: -rw-r--r-- 2,742 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
74
75
76
77
78
79
80
81
82
83
84
85
86
Feature: Wire protocol tags

  In order to use Before and After hooks in a wire server, we send tags with the
  scenario in the begin_scenario and end_scenario messages

  Background:
    Given a file named "features/step_definitions/some_remote_place.wire" with:
      """
      host: localhost
      port: 54321

      """

  Scenario: Run a scenario
    Given a file named "features/wired.feature" with:
      """
        @foo @bar
        Feature: Wired

          @baz
          Scenario: Everybody's Wired
            Given we're all wired

      """
    And there is a wire server running on port 54321 which understands the following protocol:
      | request                                              | response                            |
      | ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] |
      | ["begin_scenario", {"tags":["bar","baz","foo"]}]     | ["success"]                         |
      | ["invoke",{"id":"1","args":[]}]                      | ["success"]                         |
      | ["end_scenario", {"tags":["bar","baz","foo"]}]       | ["success"]                         |
    When I run `cucumber -f pretty -q`
    Then the stderr should not contain anything
    And it should pass with:
      """
      @foo @bar
      Feature: Wired

        @baz
        Scenario: Everybody's Wired
          Given we're all wired

      1 scenario (1 passed)
      1 step (1 passed)

      """

  Scenario: Run a scenario outline example
  Given a file named "features/wired.feature" with:
    """
      @foo @bar
      Feature: Wired

        @baz
        Scenario Outline: Everybody's Wired
          Given we're all <something>

        Examples:
          | something |
          | wired     |

    """
  And there is a wire server running on port 54321 which understands the following protocol:
    | request                                              | response                            |
    | ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] |
    | ["begin_scenario", {"tags":["bar","baz","foo"]}]     | ["success"]                         |
    | ["invoke",{"id":"1","args":[]}]                      | ["success"]                         |
    | ["end_scenario", {"tags":["bar","baz","foo"]}]       | ["success"]                         |
  When I run `cucumber -f pretty -q`
  Then the stderr should not contain anything
  And it should pass with exactly:
    """
    @foo @bar
    Feature: Wired

      @baz
      Scenario Outline: Everybody's Wired
        Given we're all <something>

        Examples: 
          | something |
          | wired     |

    1 scenario (1 passed)
    1 step (1 passed)

    """