File: require.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 (27 lines) | stat: -rw-r--r-- 634 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
Feature: Requiring extra step files

  Cucumber allows you to require extra files using the `-r` option.

  Scenario:
    Given a file named "features/test.feature" with:
      """
      Feature: Sample
        Scenario: Sample
          Given found in extra file
      """
    And a file named "tmp/extras.rb" with:
      """
      Given(/^found in extra file$/) { }
      """
    When I run `cucumber -q -r tmp/extras.rb features/test.feature`
    Then it should pass with:
      """
      Feature: Sample

        Scenario: Sample
          Given found in extra file

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