Sha256: 202725ba1bb3250f0bd9409a90f84c5a3a46a0b05eb9b17c35a7800dec6517e2

Contents?: true

Size: 1.37 KB

Versions: 24

Compression:

Stored size: 1.37 KB

Contents

Feature: Post Configuration Hook [#423]

  In order to extend Cucumber
  As a developer
  I want to manipulate the Cucumber configuration after it has been created

  # Fails on Travis under JRuby
  @spawn
  @wip-jruby
  Scenario: Using options directly gets a deprecation warning
    Given a file named "features/support/env.rb" with:
      """
      AfterConfiguration do |config|
        config.options[:blah]
      end
      """
    When I run `cucumber features`
    Then the stderr should contain:
      """
      Deprecated
      """

  Scenario: Changing the output format
    Given a file named "features/support/env.rb" with:
      """
      AfterConfiguration do |config|
        config.formats << ['html', config.out_stream]
      end
      """
    When I run `cucumber features`
    Then the stderr should not contain anything
    And the output should contain:
      """
      html
      """

  Scenario: feature directories read from configuration
    Given a file named "features/support/env.rb" with:
      """
      AfterConfiguration do |config|
        config.out_stream << "AfterConfiguration hook read feature directories: #{config.feature_dirs.join(', ')}"
      end
      """
    When I run `cucumber features`
    Then the stderr should not contain anything
    And the output should contain:
      """
      AfterConfiguration hook read feature directories: features
      """

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
cucumber-2.0.0.beta.4 features/docs/post_configuration_hook.feature
cucumber-2.0.0.beta.3 features/docs/post_configuration_hook.feature
cucumber-2.0.0.beta.2 features/docs/post_configuration_hook.feature
cucumber-2.0.0.beta.1 features/docs/post_configuration_hook.feature