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.
85 86 87 88 |
# File 'lib/vcr/test_frameworks/cucumber.rb', line 85 def initialize(test_case) @parts = [] test_case.describe_source_to self end |
Instance Method Details
#cassette_name ⇒ Object
90 91 92 |
# File 'lib/vcr/test_frameworks/cucumber.rb', line 90 def cassette_name @parts.join("/") end |
#examples_table_row(row) ⇒ Object
103 104 105 106 |
# File 'lib/vcr/test_frameworks/cucumber.rb', line 103 def examples_table_row(row) @parts.unshift "| %s |" % row.values.join(" | ") self end |
#feature(feature) ⇒ Object Also known as: scenario_outline
94 95 96 97 |
# File 'lib/vcr/test_frameworks/cucumber.rb', line 94 def feature(feature) @parts.unshift feature.name self end |
#scenario ⇒ Object Also known as: examples_table
100 |
# File 'lib/vcr/test_frameworks/cucumber.rb', line 100 def scenario(*) self end |