class Cucumber::Formatter::Junit
def create_output_string(test_case, scenario, result, row_name)
def create_output_string(test_case, scenario, result, row_name) scenario_source = @ast_lookup.scenario_source(test_case) keyword = scenario_source.type == :Scenario ? scenario_source.scenario.keyword : scenario_source.scenario_outline.keyword output = "#{keyword}: #{scenario}\n\n" return output if result.ok?(@config.strict) if scenario_source.type == :Scenario if @failing_test_step if @failing_test_step.hook? output += "#{@failing_test_step.text} at #{@failing_test_step.location}\n" else step_source = @ast_lookup.step_source(@failing_test_step).step output += "#{step_source.keyword}#{@failing_test_step.text}\n" end else # An Around hook has failed output += "Around hook\n" end else output += "Example row: #{row_name}\n" end output + "\nMessage:\n" end