Skip to content

Commit

Permalink
Use Result#ok? in the Junit Formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
brasmusson committed Jun 11, 2015
1 parent 085c58f commit c546ed9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/cucumber/formatter/junit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def before_test_case(test_case)
def after_test_step(test_step, result)
return if @failing_step_source

@failing_step_source = test_step.source.last if result.non_zero_exit_status?(@options[:strict])
@failing_step_source = test_step.source.last unless result.ok?(@options[:strict])
end

def after_test_case(test_case, result)
Expand Down Expand Up @@ -86,7 +86,7 @@ def end_feature

def create_output_string(test_case, scenario, result, row_name)
output = "#{test_case.keyword}: #{scenario}\n\n"
return output unless result.non_zero_exit_status?(@options[:strict])
return output if result.ok?(@options[:strict])
if test_case.keyword == "Scenario"
output += "#{@failing_step_source.keyword}" unless hook?(@failing_step_source)
output += "#{@failing_step_source.name}\n"
Expand All @@ -107,7 +107,7 @@ def build_testcase(result, scenario_designation, output)
name = scenario_designation

@builder.testcase(:classname => classname, :name => name, :time => "%.6f" % duration) do
if !result.passed? && !result.non_zero_exit_status?(@options[:strict])
if !result.passed? && result.ok?(@options[:strict])
@builder.skipped
@skipped += 1
elsif !result.passed?
Expand Down

0 comments on commit c546ed9

Please sign in to comment.