lib/sauce/cucumber.rb in sauce-cucumber-3.2.0 vs lib/sauce/cucumber.rb in sauce-cucumber-3.2.1
- old
+ new
@@ -122,13 +122,14 @@
'name' => job_name,
'custom-data' => custom_data)
job.save unless job.nil?
# This allow us to execute steps (n) times
- unless scenario.instance_of? ::Cucumber::Ast::OutlineTable::ExampleRow
- scenario.steps.each do |step|
- step.instance_variable_set(:@skip_invoke, false)
- end
+ is_example_row = scenario.instance_of? ::Cucumber::Ast::OutlineTable::ExampleRow
+ steps = is_example_row ? scenario.instance_variable_get(:@step_invocations) : scenario.steps
+
+ steps.each do |step|
+ step.instance_variable_set(:@skip_invoke, false)
end
block.call
# Quit the driver to allow for the generation of a new session_id