Class: CI::Reporter::Cucumber
- Inherits:
-
Object
- Object
- CI::Reporter::Cucumber
- Defined in:
- lib/ci/reporter/cucumber.rb
Instance Method Summary collapse
- #after_feature_element(feature_element) ⇒ Object
- #after_feature_name(name) ⇒ Object
- #after_step(step) ⇒ Object
- #before_feature_element(feature_element) ⇒ Object
- #before_feature_name(name) ⇒ Object
-
#initialize(step_mother, io, options) ⇒ Cucumber
constructor
A new instance of Cucumber.
Constructor Details
#initialize(step_mother, io, options) ⇒ Cucumber
Returns a new instance of Cucumber.
50 51 52 |
# File 'lib/ci/reporter/cucumber.rb', line 50 def initialize(step_mother, io, ) @report_manager = ReportManager.new("features") end |
Instance Method Details
#after_feature_element(feature_element) ⇒ Object
71 72 73 74 75 |
# File 'lib/ci/reporter/cucumber.rb', line 71 def after_feature_element(feature_element) @test_case.finish @test_case.name = "#{@test_case.name} #{@status}".strip @test_suite.testcases << @test_case end |
#after_feature_name(name) ⇒ Object
59 60 61 62 63 |
# File 'lib/ci/reporter/cucumber.rb', line 59 def after_feature_name(name) @test_suite.finish @report_manager.write_report(@test_suite) @test_suite = nil end |
#after_step(step) ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/ci/reporter/cucumber.rb', line 77 def after_step(step) case step.status when :pending, :undefined @status = "(PENDING)" if @status.empty? when :skipped @status = "(SKIPPED)" unless @status == "(FAILED)" when :failed @status = "(FAILED)" @test_case.failures << CucumberFailure.new(step) end end |