Sha256: d331bf2f4152895027dd0667ff919b749db9266af09540f3969c844088abb826

Contents?: true

Size: 1.66 KB

Versions: 21

Compression:

Stored size: 1.66 KB

Contents

Feature: Assertions
  In order to get started quickly
  As a new Cucumber user
  I want to use a familiar assertion library

  Background:
    Given a file named "features/assert.feature" with:
       """
       Feature: Assert
         Scenario: Passing
           Then it should pass
       """

    Given a file named "without_rspec.rb" with:
    """
    require 'rubygems' if RUBY_VERSION <= '1.8.7'
    require 'rspec/expectations'

    module RSpec
      remove_const :Matchers rescue nil
      remove_const :Expectations rescue nil
    end

    module Spec
      remove_const :Expectations rescue nil
    end
    """

  @spawn
  Scenario: Test::Unit
    Given a file named "features/step_definitions/assert_steps.rb" with:
      """
      require 'test/unit/assertions'
      World(::Test::Unit::Assertions)

      Then /^it should pass$/ do
        assert(2 + 2 == 4)
      end
      """
    When I run `cucumber`
    Then it should pass with exactly:
      """
      Feature: Assert

        Scenario: Passing     # features/assert.feature:2
          Then it should pass # features/step_definitions/assert_steps.rb:4

      1 scenario (1 passed)
      1 step (1 passed)
      0m0.012s

      """

  Scenario: RSpec
    Given a file named "features/step_definitions/assert_steps.rb" with:
      """
      Then /^it should pass$/ do
        (2 + 2).should == 4
      end
      """
    When I run `cucumber`
    Then it should pass with exactly:
      """
      Feature: Assert

        Scenario: Passing     # features/assert.feature:2
          Then it should pass # features/step_definitions/assert_steps.rb:1

      1 scenario (1 passed)
      1 step (1 passed)
      0m0.012s

      """

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
cucumber-1.3.20 features/assertions.feature
cucumber-1.3.19 features/assertions.feature
cucumber-1.3.18 features/assertions.feature
cucumber-1.3.17 features/assertions.feature
cucumber-1.3.16 features/assertions.feature
cucumber-1.3.15 features/assertions.feature
cucumber-1.3.14 features/assertions.feature
cucumber-1.3.13 features/assertions.feature
cucumber-1.3.12 features/assertions.feature
cucumber-1.3.11 features/assertions.feature
cucumber-1.3.10 features/assertions.feature
cucumber-1.3.9 features/assertions.feature
cucumber-1.3.8 features/assertions.feature
cucumber-1.3.7 features/assertions.feature
cucumber-1.3.6 features/assertions.feature
cucumber-1.3.5 features/assertions.feature
cucumber-1.3.4 features/assertions.feature
cucumber-1.3.3 features/assertions.feature
cucumber-1.3.2 features/assertions.feature
cucumber-1.3.1 features/assertions.feature