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

« back to all changes in this revision

Viewing changes to features/assertions.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: Assertions
2
 
  In order to get started quickly
3
 
  As a new Cucumber user
4
 
  I want to use a familiar assertion library
5
 
 
6
 
  Background:
7
 
    Given a file named "features/assert.feature" with:
8
 
       """
9
 
       Feature: Assert
10
 
         Scenario: Passing
11
 
           Then it should pass
12
 
       """
13
 
 
14
 
    Given a file named "without_rspec.rb" with:
15
 
    """
16
 
    require 'rubygems' if RUBY_VERSION <= '1.8.7'
17
 
    require 'rspec/expectations'
18
 
 
19
 
    module RSpec
20
 
      remove_const :Matchers rescue nil
21
 
      remove_const :Expectations rescue nil
22
 
    end
23
 
 
24
 
    module Spec
25
 
      remove_const :Expectations rescue nil
26
 
    end
27
 
    """
28
 
 
29
 
  @spawn
30
 
  Scenario: Test::Unit
31
 
    Given a file named "features/step_definitions/assert_steps.rb" with:
32
 
      """
33
 
      require 'test/unit/assertions'
34
 
      World(::Test::Unit::Assertions)
35
 
 
36
 
      Then /^it should pass$/ do
37
 
        assert(2 + 2 == 4)
38
 
      end
39
 
      """
40
 
    When I run `cucumber`
41
 
    Then it should pass with exactly:
42
 
      """
43
 
      Feature: Assert
44
 
 
45
 
        Scenario: Passing     # features/assert.feature:2
46
 
          Then it should pass # features/step_definitions/assert_steps.rb:4
47
 
 
48
 
      1 scenario (1 passed)
49
 
      1 step (1 passed)
50
 
      0m0.012s
51
 
 
52
 
      """
53
 
 
54
 
  Scenario: RSpec
55
 
    Given a file named "features/step_definitions/assert_steps.rb" with:
56
 
      """
57
 
      Then /^it should pass$/ do
58
 
        (2 + 2).should == 4
59
 
      end
60
 
      """
61
 
    When I run `cucumber`
62
 
    Then it should pass with exactly:
63
 
      """
64
 
      Feature: Assert
65
 
 
66
 
        Scenario: Passing     # features/assert.feature:2
67
 
          Then it should pass # features/step_definitions/assert_steps.rb:1
68
 
 
69
 
      1 scenario (1 passed)
70
 
      1 step (1 passed)
71
 
      0m0.012s
72
 
 
73
 
      """