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

« back to all changes in this revision

Viewing changes to features/raketask.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
 
@spawn
2
 
Feature: Raketask
3
 
  In order to use cucumber's rake task
4
 
  As a Cuker
5
 
  I do not want to see rake's backtraces when it fails
6
 
  Also I want to get zero exit status code on failures
7
 
  And non-zero exit status code when is pases
8
 
 
9
 
  Background:
10
 
    Given a file named "features/passing_and_failing.feature" with:
11
 
      """
12
 
      Feature: Sample
13
 
 
14
 
        Scenario: Passing
15
 
          Given passing
16
 
 
17
 
        Scenario: Failing
18
 
          Given failing
19
 
      """
20
 
    Given a file named "features/step_definitions/steps.rb" with:
21
 
      """
22
 
      Given(/^passing$/) do
23
 
      end
24
 
 
25
 
      Given /^failing$/ do
26
 
        raise "FAIL"
27
 
      end
28
 
      """
29
 
    Given a file named "Rakefile" with:
30
 
      """
31
 
        require 'cucumber/rake/task'
32
 
 
33
 
        SAMPLE_FEATURE_FILE = 'features/passing_and_failing.feature'
34
 
 
35
 
        Cucumber::Rake::Task.new(:pass) do |t|
36
 
          t.cucumber_opts = "#{SAMPLE_FEATURE_FILE}:3"
37
 
        end
38
 
 
39
 
        Cucumber::Rake::Task.new(:fail) do |t|
40
 
          t.cucumber_opts = "#{SAMPLE_FEATURE_FILE}:6"
41
 
        end
42
 
      """
43
 
 
44
 
  Scenario: Passing feature
45
 
    When I run `bundle exec rake pass`
46
 
    Then the exit status should be 0
47
 
 
48
 
  Scenario: Failing feature
49
 
    When I run `bundle exec rake fail`
50
 
    Then the exit status should not be 0
51
 
    And the output should not contain "rake aborted!"