From f82663aa96be1943e4835a6d2f03c3dda666cdd8 Mon Sep 17 00:00:00 2001 From: Eugene Batogov Date: Tue, 17 Jun 2014 19:31:49 +0400 Subject: [PATCH 1/2] add simple support for pending and skipped steps in spinach --- lib/ci/reporter/spinach.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/ci/reporter/spinach.rb b/lib/ci/reporter/spinach.rb index d04b7fb..680ada9 100644 --- a/lib/ci/reporter/spinach.rb +++ b/lib/ci/reporter/spinach.rb @@ -34,6 +34,16 @@ def on_error_step(step, failure, step_location, step_definitions = nil) @test_case.failures << SpinachFailure.new(:error, step, failure, step_location) end + def on_pending_step(step, step_location) + @test_case.name = "#{@test_case.name} (PENDING)" unless @test_case.name.include?('PENDING') + @test_case.skipped = true + end + + def on_skipped_step(step, step_location) + @test_case.name = "#{@test_case.name} (SKIPPED)" unless @test_case.name.include?('SKIPPED') + @test_case.skipped = true + end + def after_scenario_run(scenario, step_definitions = nil) @test_case.finish @test_suite.testcases << @test_case From 61c4adfea64ea02a1b28e3c3cbcbebe8480cce07 Mon Sep 17 00:00:00 2001 From: Eugene Batogov Date: Tue, 17 Jun 2014 20:32:20 +0400 Subject: [PATCH 2/2] remove on_skipped_step --- lib/ci/reporter/spinach.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/ci/reporter/spinach.rb b/lib/ci/reporter/spinach.rb index 680ada9..4dfbbeb 100644 --- a/lib/ci/reporter/spinach.rb +++ b/lib/ci/reporter/spinach.rb @@ -39,11 +39,6 @@ def on_pending_step(step, step_location) @test_case.skipped = true end - def on_skipped_step(step, step_location) - @test_case.name = "#{@test_case.name} (SKIPPED)" unless @test_case.name.include?('SKIPPED') - @test_case.skipped = true - end - def after_scenario_run(scenario, step_definitions = nil) @test_case.finish @test_suite.testcases << @test_case