Sha256: 0bd1e16f56afed1cffe28f679264d033cd2145ed5d4fa7c4500f82f14a245a92

Contents?: true

Size: 1.48 KB

Versions: 33

Compression:

Stored size: 1.48 KB

Contents

Feature: Tagged hooks

  Background:
    Given a standard Cucumber project directory structure
    And 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
      """

  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

33 entries across 33 versions & 7 rubygems

Version Path
aslakhellesoy-cucumber-0.3.101.2 features/negative_tagged_hooks.feature
aslakhellesoy-cucumber-0.3.102.1 features/negative_tagged_hooks.feature
aslakhellesoy-cucumber-0.3.102.2 features/negative_tagged_hooks.feature
aslakhellesoy-cucumber-0.3.102 features/negative_tagged_hooks.feature
aslakhellesoy-cucumber-0.3.103 features/negative_tagged_hooks.feature
aslakhellesoy-cucumber-0.3.104 features/negative_tagged_hooks.feature
kosmas58-cucumber-0.3.102 features/negative_tagged_hooks.feature
kosmas58-cucumber-0.3.103 features/negative_tagged_hooks.feature
davidtrogers-cucumber-0.6.2 features/negative_tagged_hooks.feature
cucumber-0.6.2 features/negative_tagged_hooks.feature
cucumber-0.6.1 features/negative_tagged_hooks.feature
cucumber-0.6.0 features/negative_tagged_hooks.feature
cucumber-0.5.3 features/negative_tagged_hooks.feature
cucumber-0.5.2 features/negative_tagged_hooks.feature
cucumber-0.5.1 features/negative_tagged_hooks.feature
cucumber-0.5.0 features/negative_tagged_hooks.feature
cucumber-0.4.5.rc2 features/negative_tagged_hooks.feature
kbaum-cucumber-0.4.5.pre features/negative_tagged_hooks.feature
cucumber-0.4.5.rc1 features/negative_tagged_hooks.feature
middleman-0.10.17 vendor/gems/gems/cucumber-0.4.4/features/negative_tagged_hooks.feature