Sha256: d737f0db987825061616c1ba5c671f9aac0a4a922bc1a4f6289abe4a3c68e5a9

Contents?: true

Size: 1.08 KB

Versions: 16

Compression:

Stored size: 1.08 KB

Contents

Feature: Step keyword specific definitions
  In order to allow documentary style scenarios
  As a user
  I want to define same steps with different step keywords

  Background:
    Given I am in a project using gurke

  Scenario: Use same step definition with different keyword
    Given a file "features/test.feature" with the following content exists
      """
      Feature: F
        Scenario: Scenario A
          Given I am "John"
          When I am "John"
          Then I am "John"

      """
    And a file "features/support/steps/test_steps.rb" with the following content exists
      """
      require 'test/unit/assertions'

      module Steps
        include MiniTest::Assertions

        Given(/^I am "(.+)"$/) do |name|
          @me = name
        end

        When(/^I am "(.+)"$/) do |name|
          @copy = @me
        end

        Then(/^I am "(.+)"$/) do |name|
          assert name == @copy, "Expected #{name.inspect} but #{@me.inspect} given."
        end
      end
      Gurke.world.send :include, Steps
      """
    When I execute all scenarios
    Then all scenarios have passed

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
gurke-2.3.0 features/gurke/step_specific_definitions.feature
gurke-2.2.2 features/gurke/step_specific_definitions.feature
gurke-2.2.1 features/gurke/step_specific_definitions.feature
gurke-2.1.0 features/gurke/step_specific_definitions.feature
gurke-2.0.3 features/gurke/step_specific_definitions.feature
gurke-2.0.2 features/gurke/step_specific_definitions.feature
gurke-2.0.1 features/gurke/step_specific_definitions.feature
gurke-2.0.0 features/gurke/step_specific_definitions.feature
gurke-2.0.0.dev.1.b25 features/gurke/step_specific_definitions.feature
gurke-2.0.0.dev.1.b24 features/gurke/step_specific_definitions.feature
gurke-2.0.0.dev.1.b23 features/gurke/step_specific_definitions.feature
gurke-2.0.0.dev.1.b22 features/gurke/step_specific_definitions.feature
gurke-2.0.0.dev.1.b20 features/gurke/step_specific_definitions.feature
gurke-2.0.0.dev.1.b19 features/gurke/step_specific_definitions.feature
gurke-2.0.0.dev.1.b18 features/gurke/step_specific_definitions.feature
gurke-2.0.0.dev.1.b17 features/gurke/step_specific_definitions.feature