Class: Redcukes::FeatureReport
- Inherits:
-
Object
- Object
- Redcukes::FeatureReport
- Defined in:
- lib/redcukes/feature_report.rb
Instance Method Summary collapse
- #after_feature(feature) ⇒ Object
- #after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) ⇒ Object
- #before_feature(feature) ⇒ Object
-
#initialize(step_mother, io, options) ⇒ FeatureReport
constructor
A new instance of FeatureReport.
Constructor Details
#initialize(step_mother, io, options) ⇒ FeatureReport
Returns a new instance of FeatureReport.
3 4 5 |
# File 'lib/redcukes/feature_report.rb', line 3 def initialize(step_mother, io, ) @status = {} end |
Instance Method Details
#after_feature(feature) ⇒ Object
15 16 17 18 |
# File 'lib/redcukes/feature_report.rb', line 15 def after_feature feature id = feature.file.scan(/(\d+)/).flatten[0].to_i Issue.update_status id, @status end |
#after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) ⇒ Object
11 12 13 |
# File 'lib/redcukes/feature_report.rb', line 11 def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) @status[status] += 1 if @status.has_key? status end |
#before_feature(feature) ⇒ Object
7 8 9 |
# File 'lib/redcukes/feature_report.rb', line 7 def before_feature feature @status[:errors] = @status[:undefined] = @status[:failed] = @status[:passed]= 0 end |