Sha256: fa9bb6cd7cf53fc0fe33fc8b185661178c2d32c09f4ffbc882bfa85714a3a178
Contents?: true
Size: 1.61 KB
Versions: 9
Compression:
Stored size: 1.61 KB
Contents
Feature: Before Hook Scenario: Examine names of scenario and feature Given a file named "features/foo.feature" with: """ Feature: Feature name Scenario: Scenario name Given a step """ And a file named "features/support/hook.rb" with: """ names = [] Before do |scenario| expect(scenario).to_not respond_to(:scenario_outline) names << scenario.feature.name.split("\n").first names << scenario.name.split("\n").first if(names.size == 2) raise "NAMES:\n" + names.join("\n") + "\n" end end """ When I run `cucumber` Then the output should contain: """ NAMES: Feature name Scenario: Scenario name """ Scenario: Examine names of scenario outline and feature Given a file named "features/foo.feature" with: """ Feature: Feature name Scenario Outline: Scenario Outline name Given a <placeholder> Examples: Examples Table name | <placeholder> | | step | """ And a file named "features/support/hook.rb" with: """ names = [] Before do |scenario| names << scenario.scenario_outline.feature.name.split("\n").first names << scenario.scenario_outline.name.split("\n").first if(names.size == 2) raise "NAMES:\n" + names.join("\n") + "\n" end end """ When I run `cucumber` Then the output should contain: """ NAMES: Feature name Scenario Outline: Scenario Outline name """
Version data entries
9 entries across 9 versions & 1 rubygems