Sha256: 9de4921970e5cd6a72847f946c07cac5da237f90f35a0cb3613bb4413d398b75

Contents?: true

Size: 1.43 KB

Versions: 47

Compression:

Stored size: 1.43 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
      """

  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

47 entries across 45 versions & 9 rubygems

Version Path
candlepin-api-0.4.0 bundle/ruby/gems/cucumber-1.2.1/features/hooks.feature
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/cucumber-1.2.1/features/hooks.feature
candlepin-api-0.4.0 bundle/ruby/1.8/gems/cucumber-1.2.1/features/hooks.feature
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/cucumber-1.2.1/features/hooks.feature
cucumber-1.2.5 features/hooks.feature
cucumber-1.2.3 features/hooks.feature
cucumber-1.2.2 features/hooks.feature
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/cucumber-1.2.1/features/hooks.feature
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/cucumber-1.2.1/features/hooks.feature
casecumber-1.0.2.1 features/hooks.feature
casecumber-1.2.1.cb2 features/hooks.feature
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/cucumber-1.2.1/features/hooks.feature
cucumber-1.2.1 features/hooks.feature
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/features/hooks.feature
ftl-0.2.0 vendor/bundle/gems/cucumber-1.2.0/features/hooks.feature
cucumber-1.2.0 features/hooks.feature
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/features/hooks.feature
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/features/hooks.feature
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/features/hooks.feature
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/features/hooks.feature