Parent

CI::Reporter::Spinach

Public Class Methods

new() click to toggle source
# File lib/ci/reporter/spinach.rb, line 7
def initialize
  @report_manager = ReportManager.new('features')
end

Public Instance Methods

after_feature_run(feature) click to toggle source
# File lib/ci/reporter/spinach.rb, line 39
def after_feature_run(feature)
  @test_suite.finish
  @report_manager.write_report(@test_suite)
  @test_suite = nil
end
after_scenario_run(scenario, step_definitions = nil) click to toggle source
# File lib/ci/reporter/spinach.rb, line 33
def after_scenario_run(scenario, step_definitions = nil)
  @test_case.finish
  @test_suite.testcases << @test_case
  @test_case = nil
end
before_feature_run(feature) click to toggle source
# File lib/ci/reporter/spinach.rb, line 11
def before_feature_run(feature)
  @test_suite = TestSuite.new(feature.is_a?(Hash) ? feature['name'] : feature.name)
  @test_suite.start
end
before_scenario_run(scenario, step_definitions = nil) click to toggle source
# File lib/ci/reporter/spinach.rb, line 16
def before_scenario_run(scenario, step_definitions = nil)
  @test_case = TestCase.new(scenario.is_a?(Hash) ? scenario['name'] : scenario.name)
  @test_case.start
end
on_error_step(step, failure, step_location, step_definitions = nil) click to toggle source
# File lib/ci/reporter/spinach.rb, line 29
def on_error_step(step, failure, step_location, step_definitions = nil)
  @test_case.failures << SpinachFailure.new(:error, step, failure, step_location)
end
on_failed_step(step, failure, step_location, step_definitions = nil) click to toggle source
# File lib/ci/reporter/spinach.rb, line 25
def on_failed_step(step, failure, step_location, step_definitions = nil)
  @test_case.failures << SpinachFailure.new(:failed, step, failure, step_location)
end
on_undefined_step(step, failure, step_definitions = nil) click to toggle source
# File lib/ci/reporter/spinach.rb, line 21
def on_undefined_step(step, failure, step_definitions = nil)
  @test_case.failures << SpinachFailure.new(:error, step, failure, nil)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.