Class: VCR::CucumberTags::ScenarioNameBuilder
- Inherits:
-
Object
- Object
- VCR::CucumberTags::ScenarioNameBuilder
- Defined in:
- lib/vcr/test_frameworks/cucumber.rb
Overview
Constructs a cassette name from a Cucumber 2 scenario outline
Instance Method Summary collapse
- #cassette_name ⇒ Object
- #examples_table_row(row) ⇒ Object
- #feature(feature) ⇒ Object (also: #scenario_outline)
-
#initialize(test_case) ⇒ ScenarioNameBuilder
constructor
A new instance of ScenarioNameBuilder.
- #scenario ⇒ Object (also: #examples_table)
Constructor Details
#initialize(test_case) ⇒ ScenarioNameBuilder
Returns a new instance of ScenarioNameBuilder.
74 75 76 77 |
# File 'lib/vcr/test_frameworks/cucumber.rb', line 74 def initialize(test_case) @parts = [] test_case.describe_source_to self end |
Instance Method Details
#cassette_name ⇒ Object
79 80 81 |
# File 'lib/vcr/test_frameworks/cucumber.rb', line 79 def cassette_name @parts.join("/") end |
#examples_table_row(row) ⇒ Object
92 93 94 95 |
# File 'lib/vcr/test_frameworks/cucumber.rb', line 92 def examples_table_row(row) @parts.unshift "| %s |" % row.values.join(" | ") self end |
#feature(feature) ⇒ Object Also known as: scenario_outline
83 84 85 86 |
# File 'lib/vcr/test_frameworks/cucumber.rb', line 83 def feature(feature) @parts.unshift feature.name self end |
#scenario ⇒ Object Also known as: examples_table
89 |
# File 'lib/vcr/test_frameworks/cucumber.rb', line 89 def scenario(*) self end |