Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #203 from pascalvanhecke/feature/scenario_name_in_…

…case_of_multiline_scenario_description

Feature/scenario name in case of multiline scenario description
  • Loading branch information...
commit 7d59ed7bc8cf4c3b8d5a9d4c437d9e97ed8cc6bb 2 parents 85fbe14 + 978f932
@myronmarston authored
View
5 .gitignore
@@ -36,6 +36,11 @@ features/LICENSE.md
features/Upgrade.md
features/CONTRIBUTING.md
+## PROJECT::TOOLS
+
.rvmrc
.yardoc
doc
+
+## PROJECT::EDITORS
+.idea/
View
6 features/test_frameworks/cucumber.feature
@@ -92,6 +92,12 @@ Feature: Usage with Cucumber
@vcr
Scenario: tagged scenario
+
+ Note: Like the feature pre-amble, Cucumber treats the scenario pre-amble
+ as part of the scenario name. When using the :use_scenario_name option,
+ VCR will only use the first line of the feature name as the directory
+ for the cassette.
+
When a request is made to "http://localhost:7777/localhost_request_1"
Then the response should be "Hello localhost_request_1"
View
2  lib/vcr/test_frameworks/cucumber.rb
@@ -43,7 +43,7 @@ def tags(*tag_names)
feature = scenario.respond_to?(:scenario_outline) ? scenario.scenario_outline.feature : scenario.feature
name = feature.name.split("\n").first
name << "/#{scenario.scenario_outline.name}" if scenario.respond_to?(:scenario_outline)
- name << "/#{scenario.name}"
+ name << "/#{scenario.name.split("\n").first}"
name
else
"cucumber_tags/#{tag_name.gsub(/\A@/, '')}"
View
2  spec/vcr/test_frameworks/cucumber_spec.rb
@@ -9,7 +9,7 @@ def scenario(name)
stub(:name => name, :feature => stub(:name => "My feature name\nThe preamble text is not included"))
end
- let(:current_scenario) { scenario "My scenario name" }
+ let(:current_scenario) { scenario "My scenario name\nThe preamble text is not included" }
# define our own Before/After so we can test this in isolation from cucumber's implementation.
def Before(tag, &block)
Please sign in to comment.
Something went wrong with that request. Please try again.