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

« back to all changes in this revision

Viewing changes to features/html_formatter.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: HTML output formatter
2
 
 
3
 
  Background:
4
 
    Given a file named "features/scenario_outline_with_undefined_steps.feature" with:
5
 
      """
6
 
      Feature:
7
 
 
8
 
        Scenario Outline:
9
 
          Given an undefined step
10
 
        
11
 
        Examples:
12
 
          |foo|
13
 
          |bar|
14
 
      """
15
 
    And a file named "features/scenario_outline_with_pending_step.feature" with:
16
 
      """
17
 
      Feature: Outline
18
 
 
19
 
        Scenario Outline: Will it blend?
20
 
          Given this hasn't been implemented yet
21
 
          And other step
22
 
          When I do something with <example>
23
 
          Then I should see something
24
 
          Examples:
25
 
            | example |
26
 
            | one     |
27
 
            | two     |
28
 
            | three   |
29
 
      """
30
 
    And a file named "features/failing_background_step.feature" with:
31
 
      """
32
 
      Feature: Feature with failing background step
33
 
 
34
 
        Background:
35
 
          Given this fails
36
 
 
37
 
        Scenario:
38
 
          When I do something
39
 
          Then I should see something
40
 
      """
41
 
    And a file named "features/step_definitions/steps.rb" with:
42
 
      """
43
 
      Given /^this fails$/ do
44
 
        fail 'This step should fail'
45
 
      end
46
 
      Given /^this hasn't been implemented yet$/ do
47
 
        pending
48
 
      end
49
 
      """
50
 
 
51
 
  Scenario: an scenario outline, one undefined step, one random example, expand flag on
52
 
    When I run `cucumber features/scenario_outline_with_undefined_steps.feature --format html --expand `
53
 
    Then it should pass
54
 
 
55
 
  Scenario Outline: an scenario outline, one pending step
56
 
    When I run `cucumber <file> --format html <flag>`
57
 
    Then it should pass
58
 
    And the output should contain:
59
 
    """
60
 
    makeYellow('scenario_1')
61
 
    """
62
 
    And the output should not contain:
63
 
    """
64
 
    makeRed('scenario_1')
65
 
    """
66
 
    Examples:
67
 
      | file                                                   | flag     |
68
 
      | features/scenario_outline_with_pending_step.feature    | --expand |
69
 
      | features/scenario_outline_with_pending_step.feature    |          |
70
 
      | features/scenario_outline_with_undefined_steps.feature | --expand |
71
 
      | features/scenario_outline_with_undefined_steps.feature |          |
72
 
 
73
 
  Scenario: when using a profile the html shouldn't include 'Using the default profile...'
74
 
    And a file named "cucumber.yml" with:
75
 
    """
76
 
      default: -r features
77
 
    """
78
 
    When I run `cucumber features/scenario_outline_with_undefined_steps.feature --profile default --format html`
79
 
    Then it should pass
80
 
    And the output should not contain:
81
 
    """
82
 
    Using the default profile...
83
 
    """
84
 
 
85
 
  Scenario: a feature with a failing background step
86
 
    When I run `cucumber features/failing_background_step.feature --format html`
87
 
    Then the output should not contain:
88
 
    """
89
 
    makeRed('scenario_0')
90
 
    """
91
 
    And the output should contain:
92
 
    """
93
 
    makeRed('background_0')
94
 
    """