File: handle_unexpected_response.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 (29 lines) | stat: -rw-r--r-- 1,009 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
Feature: Handle unexpected response

  When the server sends us back a message we don't understand, this is how Cucumber will behave.

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

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

      """

  Scenario: Unexpected response
    Given there is a wire server running on port 54321 which understands the following protocol:
      | request                                              | response                            |
      | ["begin_scenario"]                                   | ["yikes"]                           |
      | ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] |
    When I run `cucumber -f pretty`
    Then the output should contain:
      """
      undefined method `handle_yikes'
      """