~ubuntu-branches/ubuntu/wily/cucumber/wily-proposed

« back to all changes in this revision

Viewing changes to features/docs/cli/strict_mode.feature

  • Committer: Package Import Robot
  • Author(s): Cédric Boutillier, Antonio Terceiro, Cédric Boutillier
  • Date: 2015-06-20 16:52:32 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20150620165232-hznc8mxma08er27p
Tags: 2.0.0-1
[ Antonio Terceiro ]
* debian/cucumber.pod: fix typo in manpage (Closes: #767215)

[ Cédric Boutillier ]
* Imported Upstream version 2.0.0
* rename the file in debian/missing-source to remove -min suffix, and make
  lintian happy
* reproducibility: use last changelog date to build the manpage
* update 0004-Update_default_binary_path.patch
* drop 0001-Remove-rubygems-bundler-stuff-from-spec_helper.patch, not needed
  anymore
* build-depend on pry
* depend on ruby-cucumber-core

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Feature: Strict mode
 
2
 
 
3
  Using the `--strict` flag will cause cucumber to fail unless all the
 
4
  step definitions have been defined.
 
5
 
 
6
  Background:
 
7
    Given a file named "features/missing.feature" with:
 
8
    """
 
9
    Feature: Missing
 
10
      Scenario: Missing
 
11
        Given this step passes
 
12
    """
 
13
    And a file named "features/pending.feature" with:
 
14
    """
 
15
    Feature: Pending
 
16
      Scenario: Pending
 
17
        Given this step is pending
 
18
    """
 
19
 
 
20
  Scenario: Fail with --strict due to undefined step
 
21
    When I run `cucumber -q features/missing.feature --strict`
 
22
    Then it should fail with:
 
23
      """
 
24
      Feature: Missing
 
25
 
 
26
        Scenario: Missing
 
27
          Given this step passes
 
28
            Undefined step: "this step passes" (Cucumber::Undefined)
 
29
            features/missing.feature:3:in `Given this step passes'
 
30
 
 
31
      1 scenario (1 undefined)
 
32
      1 step (1 undefined)
 
33
      """
 
34
 
 
35
  Scenario: Fail with --strict due to pending step
 
36
    Given the standard step definitions
 
37
    When I run `cucumber -q features/pending.feature --strict`
 
38
    Then it should fail with:
 
39
      """
 
40
      Feature: Pending
 
41
 
 
42
        Scenario: Pending
 
43
          Given this step is pending
 
44
            TODO (Cucumber::Pending)
 
45
            ./features/step_definitions/steps.rb:3:in `/^this step is pending$/'
 
46
            features/pending.feature:3:in `Given this step is pending'
 
47
 
 
48
      1 scenario (1 pending)
 
49
      1 step (1 pending)
 
50
      """
 
51
 
 
52
  Scenario: Succeed with --strict
 
53
    Given the standard step definitions
 
54
    When I run `cucumber -q features/missing.feature --strict`
 
55
    Then it should pass with:
 
56
    """
 
57
    Feature: Missing
 
58
 
 
59
      Scenario: Missing
 
60
        Given this step passes
 
61
 
 
62
    1 scenario (1 passed)
 
63
    1 step (1 passed)
 
64
    """