Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

trying to fix #61

  • Loading branch information...
commit bf7282f40cd18235cd8ec7241623ef3be616488d 1 parent c17d667
kenny yairgo authored coffeencoke committed
9 fixtures/junit/features/scenario_outline.feature
View
@@ -0,0 +1,9 @@
+Feature: Scenario outlines
+
+ Scenario Outline: Using scenario outlines
+ Given a <type> scenario
+
+ Examples:
+ | type |
+ | passing |
+ | failing |
31 legacy_features/junit_formatter.feature
View
@@ -132,4 +132,33 @@ can't convert .* into String \(TypeError\)
And STDERR should match
"""
You \*must\* specify \-\-out DIR for the junit formatter
- """
+ """
+
+ Scenario: one feature, one scenario outline, two examples: one passing, one failing
+ When I run cucumber --format junit --out tmp/ features/scenario_outline.feature
+ Then it should fail with
+ """
+
+ """
+ And "fixtures/junit/tmp/TEST-scenario_outline.xml" with junit duration "0.005" should contain
+ """
+ <?xml version="1.0" encoding="UTF-8"?>
+ <testsuite errors="0" failures="1" name="Scenario outlines" skipped="0" tests="2" time="0.005">
+ <testcase classname="Scenario outlines.Using scenario outlines" name="Using scenario outlines (outline example : | passing |)" time="0.005">
+ </testcase>
+ <testcase classname="Scenario outlines.Using scenario outlines" name="Using scenario outlines (outline example : | failing |)" time="0.005">
+ <failure message="failed Using scenario outlines (outline example : | failing |)" type="failed">
+ <![CDATA[Scenario Outline: Using scenario outlines
+
+ Example row: | failing |
+
+ Message:
+ ]]>
+ <![CDATA[ (RuntimeError)
+ features/scenario_outline.feature:4:in `Given a <type> scenario']]>
+ </failure>
+ </testcase>
+ </testsuite>
+
+ """
+
4 lib/cucumber/formatter/junit.rb
View
@@ -26,6 +26,10 @@ def before_feature(feature)
@time = 0
end
+ def before_feature_element(feature_element)
+ @in_examples = feature_element.class == Ast::ScenarioOutline
+ end
+
def after_feature(feature)
@testsuite = OrderedXmlMarkup.new( :indent => 2 )
@testsuite.instruct!
Please sign in to comment.
Something went wrong with that request. Please try again.