Sha256: 9d361953cb457fda73d134548a5c0546f5a027a2b459675c16c1648b7996afc0

Contents?: true

Size: 1.44 KB

Versions: 21

Compression:

Stored size: 1.44 KB

Contents

Feature: Tagged hooks

  Background:
    Given a file named "features/step_definitions/steps.rb" with:
      """
      Given /^this step works$/ do; end
      """
    And a file named "features/support/hooks.rb" with:
      """
      Before('~@no-boom') do 
        raise 'boom'
      end
      """
    And a file named "features/f.feature" with:
      """
      Feature: With and without hooks
        Scenario: using hook
          Given this step works

        @no-boom
        Scenario: omitting hook
          Given this step works
      """
  @spawn
  Scenario: omit tagged hook
    When I run `cucumber features/f.feature:2`
    Then it should fail with:
      """
      Feature: With and without hooks
      
        Scenario: using hook    # features/f.feature:2
        boom (RuntimeError)
        ./features/support/hooks.rb:2:in `Before'
          Given this step works # features/step_definitions/steps.rb:1
      
      Failing Scenarios:
      cucumber features/f.feature:2 # Scenario: using hook
      
      1 scenario (1 failed)
      1 step (1 skipped)

      """

    Scenario: omit tagged hook
      When I run `cucumber features/f.feature:6`
      Then it should pass with:
        """
        Feature: With and without hooks

          @no-boom
          Scenario: omitting hook # features/f.feature:6
            Given this step works # features/step_definitions/steps.rb:1

        1 scenario (1 passed)
        1 step (1 passed)

        """


Version data entries

21 entries across 21 versions & 1 rubygems

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