File: erb_configuration.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 (54 lines) | stat: -rw-r--r-- 1,825 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
Feature: ERB configuration

  As a developer on server with multiple users
  I want to be able to configure which port my wire server runs on
  So that I can avoid port conflicts

  Background:
    Given a file named "features/wired.feature" with:
      """
      Feature: High strung
        Scenario: Wired
          Given we're all wired

      """

  Scenario: ERB is used in the wire file which references an environment variable that is not set
      Given a file named "features/step_definitions/server.wire" with:
        """
        host: localhost
        port: <%= ENV['PORT'] || 12345 %>
        """
      And there is a wire server running on port 12345 which understands the following protocol:
        | request                                              | response       |
        | ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[]] |
      When I run `cucumber --dry-run --no-snippets -f progress`
      Then it should pass with:
        """
        U

        1 scenario (1 undefined)
        1 step (1 undefined)

        """


  Scenario: ERB is used in the wire file which references an environment variable
      Given I have environment variable PORT set to "16816"
      And a file named "features/step_definitions/server.wire" with:
        """
        host: localhost
        port: <%= ENV['PORT'] || 12345 %>
        """
      And there is a wire server running on port 16816 which understands the following protocol:
        | request                                              | response       |
        | ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[]] |
      When I run `cucumber --dry-run --no-snippets -f progress`
      Then it should pass with:
        """
        U

        1 scenario (1 undefined)
        1 step (1 undefined)

        """