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.99.0 features/docs/post_configuration_hook.feature
mobiusloop-0.1.5 features/docs/post_configuration_hook.feature
cucumber-2.4.0 features/docs/post_configuration_hook.feature
mobiusloop-0.1.3 features/docs/post_configuration_hook.feature
mobiusloop-0.1.2 features/docs/post_configuration_hook.feature
cucumber-2.3.3 features/docs/post_configuration_hook.feature
cucumber-2.3.2 features/docs/post_configuration_hook.feature
cucumber-2.3.1 features/docs/post_configuration_hook.feature
cucumber-2.3.0 features/docs/post_configuration_hook.feature
cucumber-2.2.0 features/docs/post_configuration_hook.feature
cucumber-2.1.0 features/docs/post_configuration_hook.feature
cucumber-2.0.2 features/docs/post_configuration_hook.feature
cucumber-2.0.1 features/docs/post_configuration_hook.feature
cucumber-2.0.0 features/docs/post_configuration_hook.feature
cucumber-2.0.0.rc.5 features/docs/post_configuration_hook.feature
cucumber-2.0.0.rc.4 features/docs/post_configuration_hook.feature
cucumber-2.0.0.rc.3 features/docs/post_configuration_hook.feature
cucumber-2.0.0.rc.2 features/docs/post_configuration_hook.feature
cucumber-2.0.0.rc.1 features/docs/post_configuration_hook.feature
cucumber-2.0.0.beta.5 features/docs/post_configuration_hook.feature